SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Nov 2007
    Posts
    64
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    mysql error handling and raising application errors...

    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

    Code:
            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...

  2. #2
    reads the ********* Crier silver trophybronze trophy longneck's Avatar
    Join Date
    Feb 2004
    Location
    Tampa, FL (US)
    Posts
    9,854
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    mysql doesn't let you throw errors. if a specific data condition should result in an application error, then you need to do that in your application layer.
    Check out our new Industry News forum!
    Keep up-to-date with the latest SP news in the Community Crier

    I edit the SitePoint Podcast

  3. #3
    SitePoint Enthusiast
    Join Date
    Nov 2007
    Posts
    64
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks for the info man, i'll do just that


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •