Jump to content

problem with where condition


dodgeitorelse3

Recommended Posts

I have a query such as :

$map = mysql_real_escape_string ($_GET['map']);
	//echo $map;	
	
$result = mysql_query("select content, size, released, creator, modder, type from `maps` WHERE `trname` LIKE '$map%'
        ORDER BY trname ASC")

or die('Error, query failed');	

 this works fine except for one map which is called Abbusata_Bridge_Coop. When $_GET['map'] is equal to Abbusata_Bridge_Coop I can echo $map and it displays as such but in the query it returns it cannot find it in database however when I change query to

$result = mysql_query("select content, size, released, creator, modder, type from `maps` WHERE `trname` LIKE 'Abbusata_Bridge_Coop'
        ORDER BY trname ASC")

it works. Can anyone shed some light on this issue for me?

 

I should say that I use $map% in query because I need to show all maps that start with that name (some have added text at end of them).

 

Link to comment
https://forums.phpfreaks.com/topic/280035-problem-with-where-condition/
Share on other sites

ahhh, looking at the view source it is showing

<div style='float:left;' class='showchevy_1'>
						<iframe id='mapdl' scrolling='no' marginwidth='0' marginheight='0' frameborder='0' vspace='0' hspace='0' style='overflow:visible; width:100%;' src='/maps/php/map_dload2.php?map=Abbusata_Bridge_Coop​'>
						</iframe>
			        </div>

It must be getting the ​ from the game server itself during query. I assume I have to make a change in my database for the collation for this column. Any suggestions? I tried setting the trname column for this map to Abbusata_Bridge_Coop​ but still doesn't find it.

 

the source code for the echo is

<body bgcolor="darkslategrey"><br>

Abbusata_Bridge_Coop​<font color='lightgreen' size=2><b><i><font color='white'>Abbusata_Bridge_Coop​</font></i></b> was not found.</font></body>

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.