field type help
Posted 21 February 2006 - 11:48 PM
have a field called "status" for my news
either it should be a field that contains the value true or false ie. 0 or 1
or on the other hand i could have the value "Active" or "Inactive"
what field type would be the best for this and what would be the best way?
thanks..how comeone can help me on my query
Posted 22 February 2006 - 12:09 AM
Posted 22 February 2006 - 10:26 AM
[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]
ALTER TABLE `games` CHANGE `status` `status` ENUM( 1 ) NOT NULL DEFAULT '0'
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1) NOT NULL DEFAULT '0'' at line 1
Posted 22 February 2006 - 07:57 PM
ALTER TABLE `games` CHANGE `status` `status` ENUM( 'inactive', 'active' ) NOT NULL DEFAULT 'active'
You can, of course, switch the order of the fields.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users