rseigel Posted August 1, 2015 Share Posted August 1, 2015 SELECT * FROM ps_product WHERE ps_product.active = '1' AND ps_product.ean13 = '' AND ps_product.id_category_default != '73' Works perfectly in phpMyAdmin yet when I put it in a QUERY $result = mysqli_query($con,'SELECT * FROM ps_product WHERE ps_product.active = '1' AND ps_product.ean13 = '' AND ps_product.id_category_default != '73'') or die(mysqli_error()); it fails. Thanks, Ron Link to comment https://forums.phpfreaks.com/topic/297577-whats-wrong-with-this-select/ Share on other sites More sharing options...
Barand Posted August 1, 2015 Share Posted August 1, 2015 This is your query 'SELECT * FROM ps_product WHERE ps_product.active = ' You need to use double quotes to enclose the query, not single quotes. Link to comment https://forums.phpfreaks.com/topic/297577-whats-wrong-with-this-select/#findComment-1517866 Share on other sites More sharing options...
rseigel Posted August 1, 2015 Author Share Posted August 1, 2015 I'm such a moron....thanks for that catch. Link to comment https://forums.phpfreaks.com/topic/297577-whats-wrong-with-this-select/#findComment-1517867 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.