Is it better to put all the SQL code into one library than scatter it about your web site?
I.e. effeciency in not loading library compared to knowing where and what the SQL code is?
If you're talking about initializing everything, yes. Look for any of the Database.php classes and use them, it makes SQL as easy as $db->query($sql) and will return an associative array. Some even let you use $db->query($sql, $key) and will return an associative array based on what key you provide, where the key is a column name.