shovonbugs Posted October 8, 2013 Share Posted October 8, 2013 $result2 = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('SELECT COUNT('._DB_PREFIX_.'order_detail.`product_id`) AS id FROM `'._DB_PREFIX_.'order_detail` WHERE '._DB_PREFIX_.'order_detail.`product_id`=14'); for ($z = 0; $z < count($result2); $z++){ echo "test".$result2['id']; } the echo dosen't show any result Please help Link to comment Share on other sites More sharing options...
vekia Posted October 8, 2013 Share Posted October 8, 2013 what you've got in $result variable? can you use print_r($result2) to display it ? Link to comment Share on other sites More sharing options...
tuk66 Posted October 8, 2013 Share Posted October 8, 2013 $result2 = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue('SELECT...... echo $result2; Link to comment Share on other sites More sharing options...
Recommended Posts