Jump to content

query works in phpmyadmin but not on my site


Ayon

Recommended Posts

I'm trying to count all releases by an artist. But on the ones where artistname includes a '&' only returns 0 on my site, but in phpmyadmin i returns the correct number of releases

 

this is the query i'm using

SELECT * FROM hsdb_releases WHERE artist LIKE '%Brennan & Heart%'

 

i guess it's cause of the '&' it's failing.. any suggestions on how to solve this?

 

thanks in advance

i had the same problem, try using trim on all the fields there may be some spaces that dont show

I wrote a query that allowed me to trim all the fields in my table and rewrite them to the table trimmed and them my query included variables that had been trimmed

it worked for me after driving me nuts quite a while

someone pointed it out to me

this was the original post where i had the problem http://www.phpfreaks.com/forums/index.php/topic,279557.msg1324756.html#msg1324756

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.