How can I check if a query went wrong instead of showing errors to users (containing database info which is unsafe).
Let\'s say I have such situation where my paging
you could check it like:
function myFunction() { echo 'Oeps'; } $res = mysql_query($sql); if($res && mysql_num_rows($res)>0){ echo 'Success'; } else { myFunction(); }