I'm getting the following error in the debug logs:
PHP Code:
[19-Jan-2016 10:59:49 America/New_York] PHP Fatal error: 1064:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''A=0
ORDER BY products_name asc' at line 8 :: SELECT *
FROM products p,
products_to_categories t1,
products_description t2
WHERE p.products_id = t1.products_id
AND t1.products_id = t2.products_id
AND p.products_status = 1
AND t1.categories_id = 22'A=0
ORDER BY products_name asc ==> (as called by) /var/www/zencart/includes/modules/pages/quick_order/header_php.php on line 30 <== in /var/www/zencart/includes/classes/db/mysql/query_factory.php on line 155
Here is the code from the header file it is referencing:
PHP Code:
if (isset($_REQUEST['catid'])){
$_SESSION['navigation']->add_current_page();
$catid = zen_sanitize_string($_REQUEST['catid']);
$sql = "SELECT *
FROM ".TABLE_PRODUCTS." p, ".TABLE_PRODUCTS_TO_CATEGORIES." t1, ".TABLE_PRODUCTS_DESCRIPTION." t2
WHERE p.products_id = t1.products_id
AND t1.products_id = t2.products_id
AND p.products_status = 1
AND t1.categories_id = ".$catid . "
ORDER BY products_name asc";
$rs = $db->Execute($sql);
$i=0;
Can anyone see anything wrong with the code above?
Bookmarks