XAMPP php.ini

Note to self: when installing XAMMP for development on your legacy apps, be sure to set PHP short tags in php.ini:

short_open_tag = On

jQuery iFrame access

Trying to manipulate the iframe from a jQuery script running inside the iframe. Here is how to get a handle on the iframe with jQuery when you have id attribute iframe-id-attribute set on the iframe:

var ifr = $( '#iframe-id-attribue', window.parent.document );

MySQL Single Record Transfer Between Databases

I had a couple records disappear and needed to pull them from backup. The client had already made extensive changes to the database via CMS so I couldn’t copy over the whole database without overwriting all of their changes. Here is the SQL I came up with to transfer a single record:

INSERT INTO target_db.table 
SELECT backup_db.table.* 
FROM backup_db.table
WHERE backup_db.table.id = '{000}'

Replace target_db with the name of the database you are copying to.
Replace backup_db with the name of the backup database you are copying from.
Replace table with the name of the table you are handling.
Replace {000} with the id field value of the record to transfer.