Supplied argument is not a valid MySQL result resource
| From: | webmaster at tececo dot com | Date: | Thu, 20 Jun 2002 08:19:27 +0000 |
| Subject: | Supplied argument is not a valid MySQL result resource | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-103098@lists.php.net to get a copy of this message | ||
Here is my code:
<?
$link = mysql_pconnect("localhost", "root", "") or die("Could not
connect");
mysql_select_db("tececo") or die("Could not select database");
$fn = explode("/", $_SERVER['PHP_SELF']);
$num_of_s = count($fn) - 1;
$fn = "$fn[$num_of_s]";
$query = "SELECT * FROM meta_data WHERE page_name = $fn";
$result = mysql_query($query);
$num_results = mysql_num_rows($result);
$row = mysql_fetch_array($result);
$id = $row['id'];
$title = $row['title'];
$description = $row['description'];
$keywords = $row['keywords'];
?>
I get this error:
Warning: Supplied argument is not a valid MySQL result resource in C:\TecEco(Converting To
PHP)\includes\meta.array_create.php on line 9
Warning: Supplied argument is not a valid MySQL result resource in C:\TecEco(Converting To
PHP)\includes\meta.array_create.php on line 10
Why?
Thanks
JJ Harrison
webmaster@tececo.com
www.tececo.com