Am kicking myself tryin to get this to work.
Basically I have a database which holds users details, each row have an id number, full users name etc and there is also a field called
within this field is a bunch of numbers seperated by commas, for example
12, 56, 78, 101, 120, 167, 200, 271, 325, 427
and that's that.
I then have a front end search form which I have a input field called
the user can enter a number value into, for example
and then perform a search.
The current query I use is
SELECT * FROM members WHERE areaname = $_GET['areanamefield']
but at the moment, I cant get a result back for a number stored within the commas seperated field, so if I search for.
then it will only return rows which have just
stored in it, if
appears within a commas seperated value, then it wont return it.
Can anyone help?
I have tried the query
SELECT * FROM members WHERE areaname IN ($_GET['areanamefield'])
But it didnt seem to like that.
Any help would be great
Thanks in advance