I'm in need of inserting a control query into a hook post to retrieve if there is duplicate data.
I am using a php query but the only reaction I have is that it continues to compute forever, is it possible that there are strings of CIVI seasoning more suitable for this task?
$check = mysql_query("SELECT * FROM table WHERE code = '$invoicenum'");
$checkrows = mysql_num_rows($check);
if ($checkrows > 0) {
WARNING
}
else {
OK CONTINUE CHANGE
}
Regards