When i started with PHP/MySQL i was annoyed by always having to write:
$sql = "SELECT thing FROM place WHERE foo = bar";
$query = mysql_query($sql);
$item = mysql_select_result(PHP's params here);
echo $item;
So wrote me a nice function that took an SQL statement and returned the column specified (my_mysql_query($query, $col)). Great, until it slowly dawned on me that every item i used from the DB was a single SQL query...