The tag has no wiki summary.

learn more… | top users | synonyms

1
vote
1answer
45 views

Why does dbDelta() not catch MysqlErrors?

From what I can see, dbDelta() is designed to suppress database errors that occur during its operation. Generally speaking, this seems to be the case, but New Relic is still reporting MysqlErrors ...
-1
votes
1answer
25 views

What is wrong with this dbDelta syntax?

I know there's a million questions about this, but I've searched a bunch and haven't found any solutions that fix my problem. This is the function which I hook upon plugin activation: global $wpdb; ...
0
votes
1answer
45 views

Create new database through static page code

I want to create a new table in current database of word press through create a static page. I write code for this as below, but there was no result. Why is that, and how can I get this right? ...
0
votes
1answer
97 views

Is altering a default WordPress database table update safe?

I want to add some table columns to the wp_terms table. Is it safe to use the dbDelta function with a modified CREATE-MySQL query for this? Or will I run into problems in the long turn? Is it update ...
0
votes
1answer
135 views

dbDelta using Foreign key not working on update [duplicate]

I am using FOREIGN KEY with dbDelta when activating the plugin (register_activation_hook()). It works great when creating the table for the first time, but outputs an error when updating the table ...
0
votes
1answer
24 views

dbDelta not doing what it says

Okay so I must have read hundreds of wordpress answers, google results etc on different people having trouble with dbDelta creating tables for their plugins. Ive tried many variations based off of ...
0
votes
1answer
67 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, ...
2
votes
2answers
73 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 ...
0
votes
1answer
1k 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 = ...
5
votes
1answer
778 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 ...
3
votes
2answers
494 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 ...
2
votes
1answer
738 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; ...
6
votes
1answer
495 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
671 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 ... ...
0
votes
1answer
400 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 ...
2
votes
1answer
733 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), ...