MySQL variable with a wildcard
Posted: Wed Jan 29, 2014 4:49 pm
I am trying to use a wildcard with a variable in a mySQL LIKE command for my Livecode database routine. I am a novice so I know I must be just putting the % in the wrong spot. This is what I have -
put revQueryDatabase( theConnectionID, "select * from hospaccess.v_LogFile_Viewed where UserID = '"&gpUID&"' and Organization like '"&gOrganization&"'") into theCursor
gOrganization can be in a sting of characters so I would like it to be %gOrganization% but I can not figure out where to place the "%" to be accepted in my livecode line of code
Any suggestions?
put revQueryDatabase( theConnectionID, "select * from hospaccess.v_LogFile_Viewed where UserID = '"&gpUID&"' and Organization like '"&gOrganization&"'") into theCursor
gOrganization can be in a sting of characters so I would like it to be %gOrganization% but I can not figure out where to place the "%" to be accepted in my livecode line of code
Any suggestions?