Jump to content

SQL query not working


Gniew

Recommended Posts

Why is this code not working? All I'm getting is "1" as an echo, when it should be 45GH20 (since, that's what's in the DB)

 

<?
$conn = mysql_connect("localhost","0","0"); $db = mysql_select_db("0");

$x = $_GET['x'];
$y = $_GET['y'];
?>
<table width="75%" border="0">
  <tr>
<td><? $worked2 = mysql_query("SELECT * FROM `map` WHERE `x`=(1) AND `y`=(0)");
	$result2 = mysql_fetch_object($worked2); echo($result2-Number);?></td>
  </tr>
</table>

Link to comment
https://forums.phpfreaks.com/topic/241157-sql-query-not-working/
Share on other sites

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.