Re: Is this syntax is correct?
| From: | Amit Tandon | Date: | Mon, 06 Sep 2010 14:48:47 +0000 |
| Subject: | Re: Is this syntax is correct? | ||
| References: | 1 | Groups: | php.db php.windows |
| Request: | Send a blank email to php-db+get-47365@lists.php.net to get a copy of this message | ||
SELECT d.username, r.password FROM data join registration r on r.username
= d.username WHERE r.username like '%s' AND
r.password like '%s'"
Presuming the password stored as clear text and username is common field
SELECT d.username, r.password FROM data join registration r on r.username
= d.username WHERE r.username like '%s' AND
r.password like '%s'"
or
SELECT d.username FROM data as d, registration as r WHERE r.username like
'%s' AND
and r.password like '%s'"
and r.username = d.username
============
regds
amit
"The difference between fiction and reality? Fiction has to make sense."
On Sun, Sep 5, 2010 at 6:48 PM, nagendra prasad <nagendra802000@gmail.com>wrote:
> Hi All,
>
> Is this syntax is correct??
>
> SELECT username FROM data, password FROM registration WHERE username=%s AND
> password=%s"
>
>
> Best,
> Guru.
>