Okay, I wrote my own mysql handler, and it does everything just fine......except when I install my CMS on my windows box (I need to work out weird things on the win box so I can make sure this program will work for both linux and windows users.
Okay, here it goes.
Two connections are made, one to the accounts database, and one to the data database. Both databases are on the same server, same user, same password, but in live they won't be on the same user (same box, yes).
My first connection, called $account->conn works fine. Now.. my second one will work to a point, but then will forget which database it is using and only be able to select stuff from the accounts database. WTF?!?
Since then, I've encountered some weird workarounds.. For instance... I put the following code in my template() function and it just magically starts knowing what to do again.. ($c->conn is the data database conn btw).
$tables = mysql_list_tables($c->conn->db);
while( $row = mysql_fetch_object($tables) ) {}
Found this happened on some other places too, put in this code and BOOM, it worked.
WTF?!?
Anyone know why this is happening.. why would those 2 lines all of a sudden fix EVERYTHING? Could this be a bug in mysql, or what?