View Single Post
Old 06-27-2008, 06:52 AM   #10 (permalink)
Orc
The Prestige
 
Orc's Avatar
 
Join Date: Dec 2007
Posts: 1,044
Thanks: 193
Orc is on a distinguished road
Default

Quote:
Originally Posted by bluesaga View Post
Also, while on the topic of mysql and PHP5 - i would recommend everyone look at PHP: Mysqli - Manual it uses an object orientated approach to mysql.

The Mysqli format of doing this is especially helpful when working with multiple databases as instead of having to give a pointer to every query, you simply use the initialized db as a class ie:

Code:
$db       = new mysqli("localhost", "username", "password", "database", 3006);
$db2      = new mysqli("localhost", "username", "password", "database2", 3006);
$query    = $db->query("SELECT count(*) FROM example");
$query2   = $db2->query("SELECT count(*) FROM example");
echo $query->num_rows . "|" . $query2->num_rows;
I use that over the standard mysql functions. :P
__________________
VillageIdiot can have my babbies ;d
Orc is offline  
Reply With Quote