tags:

views:

47

answers:

2

I have this, but it doesn't work:

$query = "ALTER TABLE `".$table_prefix."posts_to_bookmark` 
            ADD `ping_status` INT( 1 ) NOT NULL BEFORE `onlywire_status`";

I appreciate it!

A: 

RTFM - MySQL ALTER TABLE Syntax.

Will A
+4  A: 
$query = "ALTER TABLE `".$table_prefix."posts_to_bookmark` ADD COLUMN `ping_status` INT(1) NOT NULL AFTER `<TABLE COLUMN BEFORE THIS COLUMN>";

I believe you need to have "ADD COLUMN" and also use "AFTER" not "BEfORE".

http://dev.mysql.com/doc/refman/5.1/en/alter-table.html

Chris
Yep, AFTER or FIRST, not BEFORE. +1
dwich
Fantastic that does it. Thank you!
atwellpub
no problem glad to help
Chris