hi everyone, im still not very familiar using mysql so im having a little bit of trouble here...how can i call a error handler in mysql? what i need to do is something like this in a stored procedure

        SELECT field1 INTO var1 FROM tbl1
if the result of the above query is nothing then an application error should be raised...can anyone show me how to do this? thanks in advance...