If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Getting stuck on ALTER...

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-07-06, 23:54
OddLaW OddLaW is offline
Registered User
 
Join Date: Feb 2005
Location: Oklahoma City, Oklahoma
Posts: 39
Getting stuck on ALTER...

I appreciate your help in advance.

I need to update and rename a column name given from a '$_POST' var. At times I will also need to ADD a column name. You may either post a URL for good instructions, or tell me how so. I am not sure what version of MySQL we are running at work though ... we have PHP5 so I am guesssing we have latest version of MySQL too.

I am using this syntax:

PHP Code:
ALTER TABLE staff CHANGE COLUMN address $_POST['var'int(11
AND

PHP Code:
ALTER TABLE staff ADD COLUMN $_POST['var'
__________________
www.m1k3.net
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On