Last night I switched servers on my site and now I have a problem.
I created a left hand column for wordpress where I do a php include of ‘left.php’. In left.php, there is code that selects my sites categories via MySQL (these categories exist outside of wordpress and are totally different part of my site).
The problem is mysql_connect and mysql_select_db. I must be dropping the connection to the WordPress database and then connecting to my custom database. This would explain why I get the following error.
WordPress database error: [Table 'textl3_MyCustomdB.wp_users' doesn't exist] SELECT * FROM wp_users WHERE ID = '2' LIMIT 1
It’s clear that WordPress is looking for wp_users in MyCustomdB and not in the WordPressdB.
So, is there a way that I can reconnect to the WordPressdB immediately after executing my left.php code?
- The topic ‘wp_users doesn’t exist’ is closed to new replies.