Hi all,

I have the following code:

$Connection = mysql_connect("127.0.0.1", "user", "pass") or die(mysql_error());
$Database = mysql_select_db('db', $Connection) or die(mysql_error());
$Url = mysql_real_escape_string("exampleurlwithonlycharacters");
$Query = "SELECT `col` FROM `table` WHERE `url` = '$Url';";
$Resource = mysql_query($Query, $Connection) or die(mysql_error());
$Result = mysql_fetch_object($Resource);
var_dump($Result);

and was expecting to see the Col => 1 (the result of the query). I've tested the exact same query in MySQL and it works correctly. No connection issues are give by mysql_error and the only result I get is:

bool(false)

I'd be grateful if a more experienced PHP-MySQL person could point me in the right direction.

Thanks in advanced for any help/tips/pointers :)

False indicates no records were returned.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.