Hi all,
I’m trying to make a test to check if there are or not records in a table within the code of a button (Create Order) .
If not I want to send a message otherwise do other things and create Order and Rows.
Here down the code that do not work properly.
Running the SELECT EXISTS on mysql the response is 0 but I read somewhere that means false… ;-(
$sql_check_div_0 = “SELECT EXISTS (SELECT * FROM products_selected)”;
sc_lookup(check_div_0,$sql_check_div_0);
$check = {check_div_0[0][0]};
if ($check == false)
{sc_confirm(“No records available”);
sc_redir(grid_products_for_order, “_parent”);}
else
something else…