Results 1 to 6 of 6
Thread: sql select statement errors!!
Apr 4, 2011, 02:27 #1
- Join Date
- Dec 2005
- 0 Post(s)
- 0 Thread(s)
sql select statement errors!!
I have an sql select query which is the following:
$sql = mysql_query("SELECT max(Price), Make, Model, Price FROM Used_Stock WHERE Make='$manufacturer' AND Feed_Id IN ('$feed_ident') GROUP BY Model ORDER BY Price ASC");
The $feed_ident is a variable which is set depending on which section of the site the user is in. The above query works fine if the variable is something like the following:
The problem I have is that this variable will sometimes be more than one number ie:
$feed_ident='11192', '12345', '978685'
When this is the case the sql query fails.
Can anyone tell me how I can write the query above so that regardless of whether the variable is one value or a range of values the query will work please.
Thanks for any help in advance.