View Single Post
Old 11-07-2007, 12:41 PM   #8 (permalink)
bluesaga
Super Moderator
Advanced Programmer 
 
bluesaga's Avatar
 
Join Date: Sep 2007
Posts: 165
Thanks: 0
bluesaga is on a distinguished road
Default

Also, while on the topic of mysql and PHP5 - i would recommend everyone look at www.php.net/mysqli 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;
__________________
Halo 3 Cheats
bluesaga is offline  
Reply With Quote