The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
1answer
14 views

dbDelta not installing database

I'm not sure why this isn't running. When I output dbDelta it says that it created the table, but it doesn't. I think my SQL is valid. Taking everything out between id and UNIQUE KEY results in the ...
0
votes
0answers
39 views

dbDelta Not Working

I have some code with dbDelta that I'm trying to use to create a new database table for my plugin: <?php global $mm_importer_version; $mm_importer_version = '1.0'; function mm_install() { ...
0
votes
1answer
50 views

dbDelta not creating tables with composite keys

I've been trying to figure this one out for 3 days now, reading every reference on dbDelta I can find. My ultimate goal is to create a table of unique ad_id, ad_trigger pairs. This does not create a ...
0
votes
1answer
11 views

Creates only one table and not the other

I have this function to create two tables when I activate the plugin. Only the wp_wpt_stats table are being created and not the wp_wpt_list. I know the dbdelta is picky, but I can't see what I'm doing ...
0
votes
1answer
33 views

Wordpress dbdelta a semicolon

I have a query, something like this $drzava ="CREATE TABLE IF NOT EXISTS`wp_drzava` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `Kod` varchar(2) NOT NULL, `Naziv` varchar(100) NOT NULL, ...
2
votes
2answers
171 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
32 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
67 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
123 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
250 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
29 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
75 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
83 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 ...
1
vote
1answer
2k 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
2k 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 ...
5
votes
2answers
842 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
894 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
704 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
1k 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
480 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 ...
3
votes
1answer
964 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), ...