$wpdb not working?
-
Hello: I have a strange issue I am hoping I can get some input on. Have a wordpress site running custom php scripts on wp-admin pages. The script uses $wpdb to interact with the wordpress database, and I also have a custom MySQL (db1) which I interact with as well in this script. I have actually run this code at three different hosts and never had a problem. Everything worked great. At this latest host; all the sudden $wpdb is not working. For some reason it looks for the wp tables in DB1 even though these are in $wpdb statements. For example – it looks for the table “wp-posts” in DB1 (and of course does not find it).
Working with the host – trying to figure out why. First – they said the php statement “global” had been removed in PHP 5.5 (i learned long ago that $wpdb functions don’t work unless you put a “global” statement first).
But then i started hearing that is totally untrue – that global has not been remove at all in PHP 5.5 …
This also has me wondering if people still use $wpdb like before or if that has been removed and there is a new way to do things. As far as I know – this is how wp sites are done! But I may be way wrong.
Can anyone give me input on all of this?
Thanks so much, Gerard
The topic ‘$wpdb not working?’ is closed to new replies.