Current location: Hot Scripts Forums » Programming Languages » PHP » Alter Table Help


Alter Table Help

Reply
  #1 (permalink)  
Old 06-14-05, 01:08 AM
DDRcasey DDRcasey is offline
New Member
 
Join Date: Jun 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Question Alter Table Help

What im trying to do is to alter a table using some code to put in a php file. I have made the code and when i run it, it dont come up with any errors but dont enter the data into the table. Here is the code I have, can anybody quickly examine it and see where the problem might lie? This part "".$db_prefix."users`" needs to be like that or in some way, what it is doing is taking from another file the db prefix and extend it with users.
Code:
             $result = dbquery("'ALTER TABLE `".$db_prefix."users` ADD `user_cellphone` TINYINT( 1 ) DEFAULT \'0\' NOT NULL ,'
        			. ' ADD `user_money` MEDIUMINT( 7 ) DEFAULT \'5000\' NOT NULL ,'
        			. ' ADD `user_computer` TINYINT( 1 ) DEFAULT \'0\' NOT NULL ;'
					. ' ADD `user_energy` SMALLINT( 4 ) DEFAULT \'100\' NOT NULL ;'
        			. ' ADD `user_food` TINYINT( 3 ) DEFAULT \'50\' NOT NULL ;'
      				. ' ADD `user_water` TINYINT( 3 ) DEFAULT \'50\' NOT NULL ;'
      				. ' ADD `user_drink` TINYINT( 3 ) DEFAULT \'0\' NOT NULL ;'
        			. ' ADD `user_eat` TINYINT( 3 ) DEFAULT \'0\' NOT NULL ;'
        			. ' ADD `user_age` MEDIUMINT( 5 ) DEFAULT \'0\' NOT NULL ;'
        			. ' ADD `user_gymvisits` SMALLINT( 3 ) DEFAULT \'0\' NOT NULL ;'
        			. ' ADD `user_weight` SMALLINT( 130 ) DEFAULT \'0\' NOT NULL ;'
        			. ' ADD `user_loan` TINYINT( 1 ) DEFAULT \'0\' NOT NULL ;'
        			. ' ADD `user_loansize` MEDIUMINT( 7 ) DEFAULT \'0\' NOT NULL ;'
        			. ' ADD `user_cc` TINYINT( 1 ) DEFAULT \'0\' NOT NULL ;'
        			. ' ADD `user_ccsize` MEDIUMINT( 7 ) DEFAULT \'0\' NOT NULL ;'
        			. ' ADD `user_minb` MEDIUMINT( 7 ) DEFAULT \'0\' NOT NULL ;'
        			. ' ADD `user_aib` TINYINT( 1 ) DEFAULT \'0\' NOT NULL ;'
        			. ' ADD `user_pin` SMALLINT( 4 ) DEFAULT \'0\' NOT NULL ;'
        			. ' '");
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with Auto Dealer Script nuzzle PHP 17 04-14-10 09:34 PM
Problem with a sort table js function tdubyou JavaScript 0 05-03-04 10:19 AM
auto table resize derick_2k JavaScript 4 04-26-04 03:32 PM
Newbie MySQL fccolon PHP 2 03-16-04 11:54 AM
changing table properties with ALTER TABLE Squid44th PHP 1 02-24-04 04:29 PM


All times are GMT -5. The time now is 08:35 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.