I have a query in DB
mysql
and it works fine, then I'm going to do the second query and it gives me the following error:
Warning: mysql_fetch_object (): supplied argument is not a valid MySQL result resource in C: \ xampp \ htdocs
Follow the PHP code below:
<php>
$open = new OpenDB();
$open->conectarNovamente($_SESSION['usuario'], $_SESSION['senha']);
$hoje = date('Y-m-d');
$sql = "call proc_rel_controle_diario(NOW(),0,0)"; // ADD 1 dia
$r = mysql_query($sql);
$obj = mysql_fetch_object($r);
$dia1 = $obj->total_geral;
$sql = "call proc_rel_controle_diario(NOW() + INTERVAL 1 DAY,0,0)"; // ADD 1 dia
$r = mysql_query($sql);
$obj = mysql_fetch_object($r);
$dia2 = $obj->total_geral;