Re: [PHP-DB] Is this syntax is correct?
[email protected] (Amit Tandon)
| Newsgroups | php.db,php.windows |
|---|---|
| Message-ID | <[email protected]> |
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 <[email protected]>wrote: > Hi All, > > Is this syntax is correct?? > > SELECT username FROM data, password FROM registration WHERE username=%s AND > password=%s" > > > Best, > Guru. >