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?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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.