I want to get a value from a table like that:
SELECT id_image FROM `ps_image` WHERE id_product = 903 limit 1
How can i integrate this sql command in prestashop?
$product_id = '903';
$query = Db:: getInstance()->getRow(
'SELECT id_image FROM '._ DB_PREFIX_.'image WHERE id_product ='. $product_id
);
Use $query variable to get id of image.