I have a table in my database called “usercardsetplaycounts” that has a column called “updatedAt” that I want to get updated with a fresh timestamp every time a row is edited. When I originally set this column up, I set the default to CURRENT_TIMESTAMP. Here is what it looks like in phyMyAdmin: The updatedAt date … Continue reading MySQL: How to automatically update timestamp column in phpMyAdmin when a row is edited
MySQL
MySQL: How to copy database from web host to localhost
Let’s say you want to copy the MySQL database used on a website to a local installation of PHP/MySQL for testing. In order to do this, you will need the following: Access to the cpanel of the website that has phpMyAdmin installed An Apache server with phpMyAdmin installed locally. For this, you can use Bitnami’s … Continue reading MySQL: How to copy database from web host to localhost
WordPress: How to create a local copy of a live site for development and testing
In this article, I will detail how to make a local “dev” copy of my live WordPress blog for the purpose of testing new styles, developing plugins and experimenting with new themes. My live WordPress blog is at http://bluegalaxy.info/codewalk. On my local Windows PC I have Bitnami WAMP stack installed, which includes an Apache2 server, … Continue reading WordPress: How to create a local copy of a live site for development and testing
How to move WordPress to a new host
Once I got the new domain name bluegalaxy.info, I wanted to move my blog over to the new domain. It was previously hosted on my laptop with a local apache installation at: http://1uslchriston.ad.here.com:8080/blog On the new domain, I wanted to change the landing from “blog” to “codewalk”, and I also don’t need to use port … Continue reading How to move WordPress to a new host
MySQL: How to run multiple queries in one
Let’s say we have a couple of simple SQL queries, one of which counts the total number of job hours: select sum(Hours) as totalCount from job_details where Job_ID = 42504; and another query that sums the total number of job hours that have been completed: select sum(Hours) as completedCount from job_details where Job_ID = 42504 … Continue reading MySQL: How to run multiple queries in one
Atom: How to run MySQL queries in Atom using a package called Data Atom
In this article, I will demonstrate how to run queries from within Atom using a package called ‘Data Atom’. Step 1: Install Data Atom package Warning: Before attempting to install any packages in Atom, make sure you disable any real-time virus or malware protection programs you have running, such as Malwarebytes. In the Atom Settings … Continue reading Atom: How to run MySQL queries in Atom using a package called Data Atom
MySQL: How to install a test database and confirm the installation
Now that I have installed PHP and MySQL: How to install PHP/MySQL and confirm the installation I wanted to start using MySQL so I searched for a sample database full of data that I could install for testing. I found this “Employee Sample Database” on the dev.mysql.com website: https://dev.mysql.com/doc/employee/en/ The instructions for installation: https://dev.mysql.com/doc/employee/en/employees-installation.html led … Continue reading MySQL: How to install a test database and confirm the installation
How to install PHP/MySQL and confirm the installation
The quickest way I found to install PHP and MySQL was to download the Bitnami WAMP stack module, which also installs a fresh Apache 2 server. See: https://bitnami.com/stack/wamp The installer I found for Windows 10 was called “bitnami-wampstack-7.1.14-0-windows-x64-installer.exe”. In running the installation, Bitnami creates a folder for apache2, php, and mysql here: C:\Bitnami\wampstack-7.1.14-0 Bitnami also … Continue reading How to install PHP/MySQL and confirm the installation