I have two tables in the tt_order and the request_grade , what I want to do is compare the values in the " request " column of the table and the column " n_pedido " of the request_grade, basically I would like to get the values you have in the tb_order and do not have in the_grade_order.
I tried the following code:
$sql = "SELECT pedido FROM pedido_tb WHERE pedido NOT IN (SELECT n_pedido FROM pedido_grade)";
$disp_sql = $mysqli->query($sql);
$num = $disp_sql->num_rows;
echo "</br>número de linhas ".$num."</br>";
Does anyone have any idea why it does not return anything?