[RESOLVED] php + mysql question
Something odd is going on here. The following code does not return $site_id when it should:
Code:
$query = 'select `site_id` from `sites` where `url`='$url'';
$result = mysql_query($query);
echo mysql_error();
$row = mysql_fetch_row($result);
if ($site_id != "")
siteScreen($site_id, $message);
else
showsites($message);
I excute the same query from PhpMyAdmin, and it works fine:
Code:
select `site_id` from `sites` where `url`='http://www.yahoo.com/'
If its incorrect, then how do I get the $site_id based on a given $url string?
... prints: Resource id #11