View Single Post
  #31 (permalink)  
Old 20-05-09, 09:31 AM
black-dog's Avatar
black-dog black-dog is offline
Senior Member
 
Join Date: May 2008
Location: Newcastle under Lyme
Posts: 205
Send a message via Yahoo to black-dog
Default

Quote:
Originally Posted by perplexed View Post
At first i thought this is insane as i pasted queries from the internal interface after using it's search/select facility and everything failed. To make matters worse was the bizzarre wording referring to terms i have never seen in php queries such as latin1_swedish_ci etc, also the operatives CONVERT and USING were inserted into the query - example below. It totally threw me.

SELECT *
FROM `table`
WHERE `SONG` LIKE CONVERT( _utf8 'love'
USING latin1 )
COLLATE latin1_swedish_ci
AND `ARTIST` LIKE CONVERT( _utf8 'beatles'
USING latin1 )
COLLATE latin1_swedish_ci
LIMIT 0 , 30


Anyway, once i catch up with things i have to do and get some sleep, i'll report back tomorrow with the solutions. It's a right old mix of removing quotes etc. and leaving some in there.
It really isn't that difficult.
phpMyAdmin is rather pedantic and you can kick most of the stuff out

SELECT *
FROM `table`
WHERE `SONG` LIKE 'love'
AND `ARTIST` LIKE 'beatles'

will be fine. In fact you don't even need the backticks around SONG and ARTIST. Please note though, that the wildcards are missing in this example.
__________________
black-dog
4theweb.co.uk Web stuff
slipperyhill.co.uk Band
Reply With Quote