The below code gives me a mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource and doesn't print the table row to the screen:
$keywords = mysql_real_escape_string($_GET['kw']);
$kw = explode(" ", $keywords);
foreach($kw AS $keyword){
$query = "SELECT id, title FROM Properties WHERE INSTR(description, $keyword) OR WHERE INSTR(area, $keyword) AND active = 'Yes'";
$result = mysql_query($query);
$info = mysql_fetch_assoc($result);
echo "<tr>";
echo "<td>".$info['id']."</td><td>".$info['title']."</td>";
echo "</tr>";
I can't figure it out, what am I missing? probably something very basic.
TIA