Re: [PHP] mysql - SUBSTRING

2001-05-13 Thread Nuno Silva
hello, i would try this: SELECT SUBSTRING(field,pos,len) AS mystring, id, blah FROM mytable WHERE mystring LIKE '%ABC%'; regards, Nuno Silva andreas (@work) wrote: > hi, > > if i use SUBSTRING(field,pos,len) in a SELECT statement it works fine > > but i cant work it out how to use this f

Re: [PHP] mysql - SUBSTRING

2001-05-12 Thread CC Zona
In article <000c01c0dabb$422d2bd0$0101@devel01>, [EMAIL PROTECTED] ("andreas \(@work\)") wrote: > but i cant work it out how to use this function in the WHERE clause > > ... WHERE SUBSTRING(field,pos,len) LIKE "ABC" > ... WHERE SUBSTRING(field,pos,len) = 'ABC' > ... WHERE SUBSTRING(fie

[PHP] mysql - SUBSTRING

2001-05-12 Thread andreas \(@work\)
hi, if i use SUBSTRING(field,pos,len) in a SELECT statement it works fine but i cant work it out how to use this function in the WHERE clause ... WHERE SUBSTRING(field,pos,len) LIKE "ABC" ... WHERE SUBSTRING(field,pos,len) = 'ABC' ... WHERE SUBSTRING(field,pos,len) LIKE 'ABC' none of them