sql problem
| From: | Rodney Davis | Date: | Fri, 17 Nov 2000 02:22:36 +0000 |
| Subject: | sql problem | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-25849@lists.php.net to get a copy of this message | ||
i can't figure out what is wrong with this query. Does
anyone know why I get the error that follows the
query?
$ME is a global variable
[snip]
$ME = $SCRIPT_NAME;
$qid = db_query("
SELECT page_id
FROM pageContent
WHERE url = $ME
");
[snip]
and, I get the following error in the browser:
[snip]
Can't execute query
SELECT page_id
FROM pageContent
WHERE url = /rtjdavis/index.php
MySQL Error: You have an error in your SQL syntax near '/rtjdavis/index.php
' at line 4
This script cannot continue, terminating.
[snip]
thanks,
rodney