nathanmaxsonadil Posted August 30, 2007 Share Posted August 30, 2007 I have a site with lots of lists and I need to list them by the users table I was wondering if it is good practice to have a field in the users table for each list and then say like yes if on and no if not? Quote Link to comment Share on other sites More sharing options...
akitchin Posted August 30, 2007 Share Posted August 30, 2007 what do you mean by lists? do you mean a series of options that are either yes or no? if you have a boolean field (either on or off, equivalent to yes or no), use a BOOLEAN field type and enter either 0 or 1. Quote Link to comment Share on other sites More sharing options...
nathanmaxsonadil Posted August 30, 2007 Author Share Posted August 30, 2007 I mean like I have 1 users table that has username email password points... I have sevral username lists that need to be listed by points in the users tableI was wondering if I should do like SELECT * FROM users WHERE list1='true' ORDER BY points... Quote Link to comment Share on other sites More sharing options...
fenway Posted August 30, 2007 Share Posted August 30, 2007 I mean like I have 1 users table that has username email password points... I have sevral username lists that need to be listed by points in the users tableI was wondering if I should do like SELECT * FROM users WHERE list1='true' ORDER BY points... No, you should have a table of lists & points. Quote Link to comment Share on other sites More sharing options...
nathanmaxsonadil Posted August 30, 2007 Author Share Posted August 30, 2007 the points get updated quite frequently so I would have to go through sevral table's Quote Link to comment Share on other sites More sharing options...
fenway Posted August 31, 2007 Share Posted August 31, 2007 Serveral? You mean one. Quote Link to comment Share on other sites More sharing options...
nathanmaxsonadil Posted August 31, 2007 Author Share Posted August 31, 2007 I have like 23 lists Quote Link to comment Share on other sites More sharing options...
fenway Posted August 31, 2007 Share Posted August 31, 2007 So, you have 23 records per user. Quote Link to comment Share on other sites More sharing options...
AndyB Posted August 31, 2007 Share Posted August 31, 2007 Now would be a really good time to restate your problem coherently with contextual examples. Maybe you know what you're trying to do, but I suspect others are slightly baffled. Quote Link to comment Share on other sites More sharing options...
nathanmaxsonadil Posted August 31, 2007 Author Share Posted August 31, 2007 ah i fixed it going over the sql tutorial on w3cschools a few times 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.