View Single Post
Old 07-09-2008, 12:27 PM   #11 (permalink)
Slide
Limey Bastard
 
Join Date: Mar 2004
Location: London innit
Posts: 744
-3 Internets
Quote:
Originally Posted by Sabolin View Post
You don't even have to bother with a class or function. If you just put:

into the opendb.php, when you call require_once("opendb.php") it will open the connection. Turns 6 lines of code in your example into 2.

Now if you're going to be opening multiple concurrent connections to the same db for whatever reason, then your method is fine.
the simple method is fine, but it fucks up when someone calls foo.php?user=;DELETE FROM blah;
Slide is offline   Reply With Quote

 
Uberguilds Network