dsp77 Posted October 19, 2009 Share Posted October 19, 2009 I have a table with the rows: ID, name, valid how can i make the "valid" row to have yes or no, true or false and what syntax would i use to view only the yes. Thank You Quote Link to comment Share on other sites More sharing options...
trq Posted October 19, 2009 Share Posted October 19, 2009 Set it to be of type int then use 0 to represent false and 1 to represent true. Quote Link to comment Share on other sites More sharing options...
dsp77 Posted October 19, 2009 Author Share Posted October 19, 2009 thank you but now i have a new problem, i want to show to the user only the valid = 1 rows but not as 1 as yes. Quote Link to comment Share on other sites More sharing options...
trq Posted October 19, 2009 Share Posted October 19, 2009 SELECT ID, Name, valid FROM tbl WHERE valid = 1 Quote Link to comment Share on other sites More sharing options...
fenway Posted October 19, 2009 Share Posted October 19, 2009 ENUMs work too. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.