WordPress create database not working

dbDelta() is very picky, below I’ve checked the requirements for dbDelta() in your code. As you can see below your code fails two of the requirements which most likely prevents dbDelta() from creating the tables. You must put each field on its own line in your SQL statement. CHECK You must have two spaces between … Read more

Database Structure on Different Servers

I don’t think WordPress can manage two databases at the same time (unless you tweak it significantly, by means of HyperDB1). So, you’d probably will like the job of abstracting two databases and making them look like one to WordPress to be done by the database functionality. WordPress can work mostly with MySQL (see WordPress … Read more

How to delete database without using any plugin?

If the database server is available publicly you should be able to use a MySQL client to interact with it. Sequel Pro is a good one for mac, check this list if you need something for windows or linux. If the database is only available locally on your web server, you might be able to … Read more

SQL syntax error when getting data for a url

Are you sure you didn’t mean $wpdb->staff? By ommitting the $, the query now looks for a table called wpdb->staff, which isn’t valid SQL As an aside, had you considered using a custom post type/user meta instead of a custom table? Or even a custom taxonomy on users? Note as well that if you never … Read more