Code: Select all
$q=$_GET["q"];
include "dbconn.php";
$result = mysql_query ("SELECT id, photoprimary, title, price, category FROM products WHERE (title LIKE '%$q%' OR description LIKE '%$q%') AND pause = 'off' AND rcstock = 'in stock' LIMIT 50")or die(mysql_error());If I enter this query into phpmyadmin, it does.
But when I use this via AJAX, it produces 26 results. The most bizarre part of this problem tho is that it produces results WITHOUT the word CATS anywhere in the page.
For example, if it comes up with a result that shouldn't be there, I click it to open that product and search the page for "cats" and the only place it finds the word is in the 'include.inc' menu, not the MySQL database results rendered on the page.
Where have I cocked up??
EDIT: Does it make a difference if in the description field of a result it says "Stoppers are designed" and you've entered "red" ??
"stoppers aRE Designed"...???
S.