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
if ($DB->query(...)) { success }
else { failure }
query should return false on failure (if you're using mysql_query or $mysqli->query). If you want to test if the UPDATE query actually did anything (which is a totally different thing than "successful") then use mysql_affected_rows or $mysqli->affected_rows