Jump to content

problem with where condition


dodgeitorelse3
Go to solution Solved by 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
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>
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.