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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.