SQL statement to evenly distribute results
Feb 24, 2019
SQL's statement to evenly distribute results
select a.gallery_id
, a.gallery_title
, b1.image_id
, b1.image_date_added
from galleries as a
inner
join images as b1
on a.gallery_id = b1.image_gallery_id
inner
join images as b2
on a.gallery_id = b2.image_gallery_id
and b1.image_adddate &l Continue reading...
Dump and restore database
Feb 24, 2019
To do a backup (also known as a dump) of a MySQL database:
%mysqldump -u$username -p$password $database > $database.sql
$username - replace with the value of your mysql username (or login)
$password - your database password
$database - replace with the name of your database
$da Continue reading...
Configure a backup routine for both your file system and database on a hosted website
Feb 24, 2019
Question: Why set up a custom backup (dump) routine on my website?
Answer: Web hosting provider commonly run backups, but they may be infrequent and depending on the age, may be stored offsite. If you configure your own backups you can probably restore a file s Continue reading...
PHP script - duplicate content in database, duplicate execution
Feb 24, 2019
Background: I developed a PHP scripts for Joomla/Virtuemart that could be used to import shipping/handling fees from a .csv file into Joomla's shipping_rate table.
Problem: Although the script executes and imports the data correctly whenever I would check the dat Continue reading...
Shell script to delete multiple MySQL tables matching a pattern
Feb 24, 2019
MySQL doesn't have a core function to delete multiple tables matching a pattern. This is a simple script that you configure, then run command-line to delete multiple tables matching a pattern. Be careful to ensure that the pattern will not also match database you do not wish to delete.
Continue reading...
Dump and restore database
Feb 24, 2019
To do a backup (also known as a dump) of a MySQL database:
%mysqldump -u$username -p$password $database > $database.sql
$username - replace with the value of your mysql username (or login)
$password - your database password
$database - replace with the name of your database
$da Continue reading...
Configure a backup routine for both your file system and database on a hosted website
Feb 24, 2019
Question: Why set up a custom backup (dump) routine on my website?
Answer: Web hosting provider commonly run backups, but they may be infrequent and depending on the age, may be stored offsite. If you configure your own backups you can probably restore a file s Continue reading...
SQL statement to evenly distribute results
Feb 24, 2019
SQL's statement to evenly distribute results
select a.gallery_id
, a.gallery_title
, b1.image_id
, b1.image_date_added
from galleries as a
inner
join images as b1
on a.gallery_id = b1.image_gallery_id
inner
join images as b2
on a.gallery_id = b2.image_gallery_id
and b1.image_adddate &l Continue reading...
PHP script - duplicate content in database, duplicate execution
Feb 24, 2019
Background: I developed a PHP scripts for Joomla/Virtuemart that could be used to import shipping/handling fees from a .csv file into Joomla's shipping_rate table.
Problem: Although the script executes and imports the data correctly whenever I would check the dat Continue reading...
Shell script to delete multiple MySQL tables matching a pattern
Feb 24, 2019
MySQL doesn't have a core function to delete multiple tables matching a pattern. This is a simple script that you configure, then run command-line to delete multiple tables matching a pattern. Be careful to ensure that the pattern will not also match database you do not wish to delete.
Continue reading...