Forum Moderators: coopster

Message Too Old, No Replies

regular expressions error - PHP & MYSQL

bizarre error - are expressions supported?

         

hessodreamy

7:20 pm on Apr 23, 2005 (gmt 0)

10+ Year Member



Are mysql regular expressions supported in PHP 5.03?
I've run the query via PHP and got an error, but the query works fine when put straight into mysql. I've not come across this error message before and don't know how to get around it, but I have heard about some incompatibility issues.
I'm using mysql 4.1 by the way

Here's a sample query output from PHP:

 
SELECT prodName FROM tProducts WHERE `prodName` REGEXP '[[:<:]]chair[[:>:]]'

and the error:


Illegal mix of collations (utf8_general_ci,IMPLICIT) and (latin1_swedish_ci,COERCIBLE) for operation 'regexp'

ergophobe

1:22 am on Apr 24, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I don't think this has anything to do with the REGEX per se, since the bug reports show it for all sorts of queries.

Try checking this first: [bugs.mysql.com...]

When you dump your table structure, are you mixing charsets in the table definition?