Mahouza Posted April 19, 2007 Share Posted April 19, 2007 Hey, I'm now working with some very weird characters and i can't figure out how i can use those in an query. For example: #eFrag.css|ÄλÑÒœ An user used this username. But the problem is i cant refuse him cause i get this data from other servers so out of my control. Now i need to search trough my DB if this user exists. I've tried alot and i got stuck at this place: SELECT s.ID AS ID, s.Name AS servername, s.Port AS port, s.Password AS pass, s.Country as country, s.Map AS map, s.Curplayers AS numplayers, s.Maxplayers AS maxplayers, s.host AS ip, s.Game AS gamename,s.Time AS timestamp, p.Name AS playername, p.ServerID, game.shortname, game.zoomname FROM servers s, players p LEFT JOIN game ON s.Game=game.shortname WHERE s.ID = p.ServerID AND p.Name LIKE CONVERT( _utf8 '%#eFrag.css|ÄλÑÒœ%' USING latin1) COLLATE latin1_swedish_ci ORDER BY p.Name, s.Name Query error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ''%#eFrag.css|ÄλÑÒœ%' USING la Who can help me? Cause i'm already trying with this problem for 3 hours and several people helped me but they didn't know either. Thx alot! Sincerely, Mahouza Quote Link to comment https://forums.phpfreaks.com/topic/47738-mysql-character-problem/ Share on other sites More sharing options...
bubblegum.anarchy Posted April 20, 2007 Share Posted April 20, 2007 There is an extra leading ' in the query error message. I tried the following query successfully: SELECT CONVERT(_utf8 '%#eFrag.css|ÄλÑÒœ%' USING latin1) COLLATE latin1_swedish_ci; Quote Link to comment https://forums.phpfreaks.com/topic/47738-mysql-character-problem/#findComment-233722 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.