Tuesday, 20 August 2013

Mysql AND WHERE selection

Mysql AND WHERE selection

i have te make a slection but cannot get it to work with the WHERE LIKE
function. What is wrong with the line below?
$result = mysql_query("SELECT * FROM games WHERE soort='nieuws' AND
gamenaam='$spelnaam' AND platform LIKE '%wiiu%' AND ORDER BY id DESC");
It worked until i added
AND platform LIKE '%wiiu%'
The platform column contains cells with multiple values that come from a
selection box form. So it writes, wiiu, ps4, xbox360, pc etc....Must be
simple but i tried like a million times...

No comments:

Post a Comment