Your missing a ' before the area code.
-Original Message-
From: jason wesley upton [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 30, 2003 2:43 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] SQL: Limit 1 usage?
Currently I have a script that contains this piece of code:
$sql
$sql = SELECT * FROM accessnums WHERE areacode=$_POST[areacode]' and
city='$_POST[cityselected]' ORDER BY network LIMIT 1;
It can't execute the query. Any suggestions?
Unless it's a typo, you're missing a single quote around $_POST[areacode]...
---John Holmes...
--
PHP Database Mailing
- Original Message -
From: jason wesley upton [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, January 30, 2003 9:42 PM
Subject: [PHP-DB] SQL: Limit 1 usage?
Currently I have a script that contains this piece of code:
$sql = SELECT MIN(network
, January 30, 2003 5:12 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] SQL: Limit 1 usage?
Hmm, I trried your syntax and same problem.
I tried it exactly like this: (though i'd like to stress that it
worked
with the code labeled ORIGINAL below)
?php