query execution error check
<p>hello please help me out regarding this function </p>

<pre><code>  function delete($serviceid) 
    {
    $result = $this-&gt;query=("delete from service where service_id='$serviceid'");
    $exe=$this-&gt;executeNonQuery();
    if ($exe){
    return $success = "Record deleted successfully.";
    } else {
    return $error = "Unable to process at this time.";
    }
    }
</code></pre>

<p>$exe is always 1 even if the record is not deleted as may b its because of , it only check that query is executed or not , how can i check if the record is deleted then show success message</p>
