I have this query and if it returns successful, I want another function to process, if not, do not process that function.
Here is the code for running the query
This has proven the safest mechanism for me to test for failure on insert or update:
$result = $db->query(' ... '); if ((gettype($result) == "object" && $result->num_rows == 0) || !$result) { failure }