sitepoint recently discovered when and why row-level locking (as opposed to table-level) is sometimes a must-have…
hadn’t filled in some code i was completing and within it was a sql statement of the form:
INSERT INTO TableName () VALUES ();
to my surprise, this is valid syntax, and inserted a row with a correct auto_increment for the primary key, and null or defaults for the remaining columns.
a number of articles and blog posts exist that (attempt to) explain how one might go about connecting to a remote mysql server by way of an ssh tunnel… a vast majority of them are a copy-and-paste of the same information on how to do it using PuTTY as go-between.
seeing as how PuTTY serves the […]
no idea what version to which this applies as i’ve never installed or configured gallery2, but here’s the process by which i just now debugged one particular gallery2 install…
line 30 - @ini_set(’display_errors’, 1);
line 134 - $gallery->setDebug(’buffered’);
Unknown column ‘g2_Item.g_renderer’
grep -r ‘renderer’ *
CREATE TABLE DB_TABLE_PREFIXItem(
DB_COLUMN_PREFIXownerId int(11) NOT NULL,
ALTER TABLE g2_Item ADD g_renderer VARCHAR(128) NULL AFTER […]
when mixing standard selects containing table aliases with LEFT JOIN’s you need be aware of a critical change as of mysql 5… if you reference a table alias in an ON clause the same way you might have in verison 4, mysql may report an ‘unknown column’ error.
so, a query of the form:
SELECT a.id FROM […]