Posted By

brownrl on 06/24/09


Tagged

database wrapper query


Versions (?)

Who likes this?

4 people have marked this snippet as a favorite

SmpleJohn
jseltzer
vali29
umang_nine


PHP dbquery


 / Published in: PHP
 

URL: http://www.itsgotto.be/cv.php

Here is a wrapper for making database queries. It doesn't matter who the F!@k you think you are you should always wrap querying the database in your own function.

WHY?

Because when you take your application to a new server, you won't have to change all the calls to mysqlquery() to pgsql_query() or $db->query() or what ever you are now using.

!!!Plus!!!

When you query fails you can handle that in a very nice way with a proper error screen and maybe send an email to your self.

Report this snippet  

You need to login to post a comment.