Hi all,
I’ve still problem with ERROR Undefined offset: 0
If the select below do not find any record how have I to manage it without having the annoying error ?
$sql_check_payment = “SELECT paymentID FROM payments
WHERE InvoiceID = [glo_invoiceNr] AND invoiceDate = ‘[glo_invoiceDate]’ AND vendorID = [glo_vendorID]”;
sc_lookup(check_payment, $sql_check_payment);
$check_payment = {check_payment[0][0]};
No one of following works
- if (isset({check_payment[0][0]})) // Row found
- if (isset($check_payment)) // Row found
- if(empty($check_payment)) // Row not found
after test I have to INSERT or UPDATE the record. With UPDATE I do not have any error.