0
Can someone help me with this code.
Makes that mistake:
Warning: mysql_fetch_array() expects Parameter 1 to be Resource, Boolean Given in /var/www/xxx/teste.php on line 14
Notice: Undefined variable: status in /var/www/santa/teste2.php on line 23
include "mysql.php";
$ped_venda_id = 13;
$sql = mysql_query ("SELECT pvi.ped_venda_id, IF(pvi.volume_restante ==0, 'T', IF(pvi.volume_total == pvi.volume_restante, 'N', 'P')) as 'status' FROM ped_vendas_item.pvi WHERE ped_venda_id = '$ped_venda_id' ");
while($r = mysql_fetch_array($sql)){
$status = $r['status'];
}
echo $status;
Thank you for answering. That really was the problem. But the concept of my code is not meeting me. Thank you anyway.
– Saulo