Ayon Posted February 15, 2010 Share Posted February 15, 2010 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 Quote Link to comment https://forums.phpfreaks.com/topic/192128-query-works-in-phpmyadmin-but-not-on-my-site/ Share on other sites More sharing options...
gevensen Posted February 15, 2010 Share Posted February 15, 2010 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 Quote Link to comment https://forums.phpfreaks.com/topic/192128-query-works-in-phpmyadmin-but-not-on-my-site/#findComment-1012586 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.