So ... while paralyzed by database interaction choices last night, I definitely learned one thing.
(What I already knew:)
There are three types of MySQL database access baked into PHP. A library of functions called "mysql_*" (they are outdated & dangerous), a library of functions/objects called "mysqli_*" (they are less-outdated and slightly safer), and "PDO", which is pretty powerful and allows you to abstract database access stuff.
(What I learned)
mysqli_* prepared statements are *ass*. When writing an update query in a prepared statement, it looks like this:
[code]
UPDATE tablename SET columnname = ? WHERE id = ?;
[/code]
And then you have to replace the question marks using a call like this (if the id is "5", for example):
[code]
$query->bindParams('sd', [ 'NewColumnValue', 5] );
$query->execute();
[/code]
Doing it with PDO was much nicer:
[code]
UPDATE tablename SET columnname = :columnvalue WHERE id = :row_id;
[/code]
and
[code]
$stmt->execute(['columnvalue'=>'NewColumnValue','row_id'=>5]);
[/code]
The ability to name columns like that is so much easier to maintain, especially in complicated queries.