Syntax Error
am 07.01.2007 23:09:25 von JD
Can anyone help me figure out what is wrong with this syntax. Thanks.
list($qh,$num) = dbQuery("SELECT password AS passwd1,
$DATABASE_PASSWORD_FUNCTION('$password') AS passwd2 ".
"FROM $USER_TABLE WHERE username='$username'");
$data = dbResult($qh);
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Syntax Error
am 08.01.2007 00:50:02 von Chris
JD wrote:
> Can anyone help me figure out what is wrong with this syntax. Thanks.
>
> list($qh,$num) = dbQuery("SELECT password AS passwd1,
> $DATABASE_PASSWORD_FUNCTION('$password') AS passwd2 ".
>
> "FROM $USER_TABLE WHERE username='$username'");
>
> $data = dbResult($qh);
>
No need to repost your question.
What is the $DATABASE_PASSWORD_FUNCTION variable ?
What is the $USER_TABLE variable ?
Since there are 4 variables in this query ($DATABASE_PASSWORD_FUNCTION,
$password, $USER_TABLE, $username), we have no idea what's actually
being run.
The easiest way to work out what's wrong is to print the query out and
run it manually.
$query = "SELECT password AS passwd1,
$DATABASE_PASSWORD_FUNCTION('$password') AS passwd2 FROM $USER_TABLE
WHERE username='$username'";
echo wordwrap($query) . "
\n";
list ($qh, $num) = dbQuery($query);
.....
Post us the real sql query that's being run through that and we might be
able to help you.
--
Postgresql & php tutorials
http://www.designmagick.com/
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Syntax Error
am 08.01.2007 01:03:02 von Niel Archer
Hi
is the syntax error reported for the php or the SQL? Better yet,
supply the actual error message, so we can see for ourselves
Niel
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php