Syntax Error

Syntax Error

am 06.01.2007 19:09:45 von JD

I am getting a syntax error in the statement below. Can anyone tell me what
it is. 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 09.01.2007 12:34:36 von dmagick

------=_NextPart_3ea_97a9_542e4a13.5f247da4_.MIX
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

JD wrote:
> Can anyone help me figure out what is wrong with this syntax. Thanks.
>=20
> list($qh,$num) =3D dbQuery("SELECT password AS passwd1,=20
> $DATABASE_PASSWORD_FUNCTION('$password') AS passwd2 ".
>=20
> "FROM $USER_TABLE WHERE username=3D'$username'");
>=20
> $data =3D dbResult($qh);
>=20

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,=20
$password, $USER_TABLE, $username), we have no idea what's actually=20
being run.

The easiest way to work out what's wrong is to print the query out and=20
run it manually.

$query =3D "SELECT password AS passwd1,=20
$DATABASE_PASSWORD_FUNCTION('$password') AS passwd2 FROM $USER_TABLE=20
WHERE username=3D'$username'";

echo wordwrap($query) . "
\n";

list ($qh, $num) =3D dbQuery($query);

...

Post us the real sql query that's being run through that and we might be=
=20
able to help you.

--=20
Postgresql & php tutorials
http://www.designmagick.com/

--=20
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




************************************************************ **********

IMPORTANT NOTICE

This communication is for the exclusive use of the intended recipient(s)
named above. If you receive this communication in error, you should
notify the sender by e-mail or by telephone (+44) 191 224 4461, delete
it and destroy any copies of it.

This communication may contain confidential information and material
protected by copyright, design right or other intellectual property
rights which are and shall remain the property of Piranha Studios
Limited. Any form of distribution, copying or other unauthorised use
of this communication or the information in it is strictly prohibited.
Piranha Studios Limited asserts its rights in this communication and
the information in it and reserves the right to take action against
anyone who misuses it or the information in it.

Piranha Studios Limited cannot accept any liability sustained as a
result of software viruses and would recommend that you carry out your
own virus checks before opening any attachment.

************************************************************ ************
<<<>>>
------=_NextPart_3ea_97a9_542e4a13.5f247da4_.MIX
Content-Type: text/plain;
name="GWAVADAT.TXT"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment; filename="GWAVADAT.TXT"

AdmID:FDCC4BF0137FBAD5719D291166E69478



************************************************************ **********

IMPORTANT NOTICE

This communication is for the exclusive use of the intended recipient(s)
named above. If you receive this communication in error, you should
notify the sender by e-mail or by telephone (+44) 191 224 4461, delete
it and destroy any copies of it.

This communication may contain confidential information and material
protected by copyright, design right or other intellectual property
rights which are and shall remain the property of Piranha Studios
Limited. Any form of distribution, copying or other unauthorised use
of this communication or the information in it is strictly prohibited.
Piranha Studios Limited asserts its rights in this communication and
the information in it and reserves the right to take action against
anyone who misuses it or the information in it.

Piranha Studios Limited cannot accept any liability sustained as a
result of software viruses and would recommend that you carry out your
own virus checks before opening any attachment.

************************************************************ ************
<<<>>>

------=_NextPart_3ea_97a9_542e4a13.5f247da4_.MIX
Content-Type: text/plain; charset=us-ascii

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
------=_NextPart_3ea_97a9_542e4a13.5f247da4_.MIX--

Re: Syntax Error

am 09.01.2007 12:34:49 von Niel Archer

------=_NextPart_9df_51f0_8ca046d8.af6b601d_.MIX
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

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

--=20
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




************************************************************ **********

IMPORTANT NOTICE

This communication is for the exclusive use of the intended recipient(s)
named above. If you receive this communication in error, you should
notify the sender by e-mail or by telephone (+44) 191 224 4461, delete
it and destroy any copies of it.

This communication may contain confidential information and material
protected by copyright, design right or other intellectual property
rights which are and shall remain the property of Piranha Studios
Limited. Any form of distribution, copying or other unauthorised use
of this communication or the information in it is strictly prohibited.
Piranha Studios Limited asserts its rights in this communication and
the information in it and reserves the right to take action against
anyone who misuses it or the information in it.

Piranha Studios Limited cannot accept any liability sustained as a
result of software viruses and would recommend that you carry out your
own virus checks before opening any attachment.

************************************************************ ************
<<<>>>
------=_NextPart_9df_51f0_8ca046d8.af6b601d_.MIX
Content-Type: text/plain;
name="GWAVADAT.TXT"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment; filename="GWAVADAT.TXT"

AdmID:CBE4B095E96FA633FC7643E6228B7CCE



************************************************************ **********

IMPORTANT NOTICE

This communication is for the exclusive use of the intended recipient(s)
named above. If you receive this communication in error, you should
notify the sender by e-mail or by telephone (+44) 191 224 4461, delete
it and destroy any copies of it.

This communication may contain confidential information and material
protected by copyright, design right or other intellectual property
rights which are and shall remain the property of Piranha Studios
Limited. Any form of distribution, copying or other unauthorised use
of this communication or the information in it is strictly prohibited.
Piranha Studios Limited asserts its rights in this communication and
the information in it and reserves the right to take action against
anyone who misuses it or the information in it.

Piranha Studios Limited cannot accept any liability sustained as a
result of software viruses and would recommend that you carry out your
own virus checks before opening any attachment.

************************************************************ ************
<<<>>>

------=_NextPart_9df_51f0_8ca046d8.af6b601d_.MIX
Content-Type: text/plain; charset=us-ascii

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
------=_NextPart_9df_51f0_8ca046d8.af6b601d_.MIX--