Woodburn2006 Posted December 8, 2007 Share Posted December 8, 2007 i used a php form to put data into a DB table. 1 of the columns data is a list like: cd,radio,tv how do i select the records that just say CD? i have tried: $sql_1cd = "SELECT * FROM dissertation WHERE q1 = '%cd%'"; but it returns no results when i know there are fields containing CD Quote Link to comment Share on other sites More sharing options...
Barand Posted December 8, 2007 Share Posted December 8, 2007 2 mistakes 1 ) WHERE q1 LIKE '%cd%' 2 ) Not normalising the data in the first place Quote Link to comment Share on other sites More sharing options...
Woodburn2006 Posted December 8, 2007 Author Share Posted December 8, 2007 yeh i know i isnt normalised but it was set up in about 5 minutes cos its a questionnaire for uni work thanks 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.