MySQL Forums
Forum List  »  General

Re: How to force a varchar number into a string?
Posted by: Rick James
Date: February 15, 2015 12:22PM

Abandon the function until you figure out the logic. It is much simpler to try fragments of the code using the mysql commandline tool (or phpmyadmin or other ui). Notice how I gave the RLIKE example as just a fragment.

Gradually build up -- try each part of the IF statement to verify that the pieces are working as expected. Only then, move on to the UPDATE.

Is the call to the Stored Routine coming from someone directly logged into mysql? (It should NOT.) If not, what language is calling the Routine? And is this Routine being called from only one place in the code? Perhaps you should not use a Stored Routine, but use application code? That would give you an opportunity to add "print" or "echo" statements to help in debugging.

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.