Let us say we’ve database table my_table with the following structure
CREATE TABLE `my_table` (
`title` text,
`name` text
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
INSERT INTO `admin` VALUES ('my title', 'my name');
Now i want to update it to be with 1 extra field slogan to be like this
CREATE TABLE `my_table` (
`title` text,
`name` text,
`slogan` text
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
INSERT INTO `admin` VALUES ('my title', 'my name', 'my slogan');
For sure if it 10 or even 100 i can do it using regex with any text editor but i it too huge for my processor to do it so i’ve been thinking to use PHP to update my table while it on my hosting server.
I’ve been thinking to use
$q1 = "CREATE TABLE `my_table`(
`slogan` text )";
mysql_query($q1) or die(mysql_error()." at row ".__LINE__);
but given me error my_table already exist
so any help ~ thanks
What you need is
followed by lots of