The dbdelta tag has no wiki summary.
6
votes
1answer
187 views
dbDelta support for FOREIGN KEY
On PHP 5.3.13/MySQL 5.5.21 the following code doesn't work:
if($check_custom_fields_form!=1){
$sql = "CREATE TABLE IF NOT EXISTS ". $table_custom_fields_form ." (
`form_name` ...
2
votes
1answer
106 views
dbDelta not creating tables
I went through a lot of threads, codex page and tried messing with a lot of things but my code doesn't seem to be creating the tables. And I am not able to figure out where I am going wrong.
I checked ...
2
votes
2answers
45 views
What files to keep after upgrading WordPress?
We were recently handed a few blogs/sites to support, that have started way back when wordpress was on v2.1.3 or even 2.0.4
After upgrading the sites to the latest versions (3.4.2 and 3.5) we found ...
2
votes
1answer
378 views
Problems with DBDelta with FOREIGN key?
I have the following sql I am using with dbDelta:
$sql .= "CREATE TABLE " . $location_table . " (
location_id MEDIUMINT(9) NOT NULL AUTO_INCREMENT,
name VARCHAR (100),
...
1
vote
2answers
100 views
Does dbDelta delete columns as well?
I created a table using the dbDelta function and then removed a few columns and added a few. The new columns did get created but the old columns did not get deleted from the table.
Is there a ...
1
vote
1answer
164 views
dbDelta only creates the last table
I'm using following install function with dbDelta as referring to the codex, articles on SO I watched out for the typical problems with e.g. one space instead of two spaced at the PRIMARY KEY ...
...
1
vote
1answer
411 views
Problem in creating table through plugin code
I'm using the following code to create the database table using plugin.
However, the table is neither getting created nor I'm getting any error message.
The code is as follows:
global $wpdb;
...
0
votes
1answer
204 views
dbDelta ALTER TABLE syntax?
Due to some changes in the DB, I need to alter a table to add one column to it, but even though the function is running, the table isn't altered.
Here's the ALTER TABLE code that I've written
$sql = ...
0
votes
1answer
29 views
Print output of Table Creation
I am creating a few tables and I getting the following message:
The plugin generated 440 characters of unexpected output during
activation. If you notice “headers already sent” messages, ...
0
votes
1answer
276 views
dbdelta failing with error: "WordPress database error Table 'wp_2_myPlugin' already exists
I'm upgrading a plugin and having issues with dbdelta.
Here's the original db creation function:
global $jal_db_version;
$jal_db_version = "0.1";
function jal_install() {
global ...