RE: [PHP] revised query problem (sorry)
| From: | Jay Blanchard | Date: | Tue, 28 Oct 2003 17:13:50 +0000 |
| Subject: | RE: [PHP] revised query problem (sorry) | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-167896@lists.php.net to get a copy of this message | ||
[snip]
$query="SELECT payment
FROM payment
WHERE payment.dln='".$_POST["dln"]."'
= users.dln='".$_POST["dln"]."'
and payment.payment='".$_POST["payment"]."'";
Will this work?
[/snip]
Aside from what Chris said (excellent advice!) the query above will not
work because the 4rth line
= users.dln='".$_POST["dln"]."'
has no conditional on it. In other words you cannot say
WHERE foo=foo=bar=bar
you need to say
where foo=foo
and bar=bar
and payment=paypment
Other than that this is bad for the reasons Chris stated.