mardi 28 juin 2016

laravel check if no returned records

I am trying to run a stored procedure, if it matches then it returns the information. If it doesn't match, then nothing is returned.

When nothing returns, I get this error: SQLSTATE[IMSSP]: The active result for the query contains no fields.

How can I catch this error and throw a 403 instead of this error? I tried adding SET NOCOUNT ON ;, it didn't help. or count($response), I keep getting this error.

What else can I put in place?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire