Re: [PHP4BETA] SQL abstraction
| From: | Andrey Zmievski | Date: | Wed, 30 Jun 1999 14:20:00 +0000 |
| Subject: | Re: [PHP4BETA] SQL abstraction | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-1750@lists.php.net to get a copy of this message | ||
Stig Bakken wrote:
> I see your point. At the very least, there should be a separate prepare
> function for it, due to the obscurity of its semantics. It would also
> have to handle stuff like "a is not null and b like ?". What about mixing
> AND and OR? Should it simply strip away the tests where the parameter is
> empty?
Yes, it should be able to handle any part of where clause the variable can
occur in. As far as mixing AND and OR:
(foo = $foo or bar like $bar) and top < $level
If $level matches drop string, the result is:
(foo = $foo or bar like $bar)
If $foo matches drop string, the result is:
(bar like $bar) and top < $level
> Anyway this is definitely a "version 2" feature.
Aw, but it's so useful. :)
-Andrey
"Freedom comes when you learn to let go.
Creation comes when you learn to say no."
-madonna