Need help making Query for MYSQL

St4nley

Member
Apr 13, 2013
469
76
how do i update a table "users" that has a column allow_trading that is set to 0 for every account, and i would like to set that to 1

also i need a query so that new users are set to 1 automatically, thanks!

edit: i meant that the new users have their column allow_trading set to 1
 

Sean

‫‫‫‫‫‫  ‫  Don't Worry, Be Happy
Dec 12, 2011
1,121
405
If you just want all new users to have trading to be 1 - set the default value to 1 in Phpymyadmin

jZqY7AP.png
 

St4nley

Member
Apr 13, 2013
469
76
If you just want all new users to have trading to be 1 - set the default value to 1 in Phpymyadmin

jZqY7AP.png

navicat my friend, and when i went into design table found that column set it to '1' i hit save and it would fly back to 0.


exact properties are : enum, (length) 0, (decimals) 0, allow null (not checked)
 

Sean

‫‫‫‫‫‫  ‫  Don't Worry, Be Happy
Dec 12, 2011
1,121
405
navicat my friend, and when i went into design table found that column set it to '1' i hit save and it would fly back to 0.


exact properties are : enum, (length) 0, (decimals) 0, allow null (not checked)



Try doing it in phpmyadmin for this one thing...
 

Sean

‫‫‫‫‫‫  ‫  Don't Worry, Be Happy
Dec 12, 2011
1,121
405
download this: and upload into your directory, then navigate to it and try it, because if it's jumping you back to 0 it might be an error in the program :p
 

St4nley

Member
Apr 13, 2013
469
76
download this: and upload into your directory, then navigate to it and try it, because if it's jumping you back to 0 it might be an error in the program :p
thanks, im on it now i opened my table but how do i set default xD there is no design table option

EDIT: THANK YOU I FIXED IT :)
 

Sean

‫‫‫‫‫‫  ‫  Don't Worry, Be Happy
Dec 12, 2011
1,121
405
Click the database on the left hand side, then click the table underneath it that pops out.
Then click Structure at the top nav bar
Click the checkbox of the one you want to edit
Click edit
Then input a value of 1 into the Default Box
 

Users who are viewing this thread

Top