Re: string compare

2004-06-16 Thread SGreen
To: MySQL Mailing List <[EMAIL PROTECTED]> ca> cc: Fax to:

Re: string compare

2004-06-16 Thread gerald_clark
Bob Lockie wrote: Where is the syntax error in this? select name from users where name like '%' and strcmp( substr(name from 1 for 3), 'abc' )=0; substr(name,1,3) Check the manual. You don't include the 'from' and 'for'. Why should I use strcmp since "MySQL automatically converts numbers to str

string compare

2004-06-16 Thread Bob Lockie
Where is the syntax error in this? select name from users where name like '%' and strcmp( substr(name from 1 for 3), 'abc' )=0; Why should I use strcmp since "MySQL automatically converts numbers to strings as necessary, and vice versa."? -- MySQL General Mailing List For list archives: http://

Re: string compare problem with single quote in string

2002-06-25 Thread Victoria Reznichenko
testacct, Monday, June 24, 2002, 3:37:37 PM, you wrote: t> I am comparing songnames from two tables to find a match. t> My query looks like this: t> $querymvideo = "select movietable.id, movietable.songname t> from movietable where TRIM(movietable.songname) LIKE t> '__$foo' "; t> The above quer

string compare problem with single quote in string

2002-06-24 Thread testacct
I am comparing songnames from two tables to find a match. My query looks like this: $querymvideo = "select movietable.id, movietable.songname from movietable where TRIM(movietable.songname) LIKE '__$foo' "; The above query works fine except when a songname has the single quote symbol: "'" or may