From: Reini U. <rei...@gm...> - 2005-10-10 08:24:32
|
On 10/4/05, John Stevens <jst...@gm...> wrote: > > If you dig into the sources, you will see that those TRUE statements (a= lso > 1=3D1) > > come from the search library, which is a pretty good library IMHO. > > I must disagree with this assessment. There should be no reason to do a > TRUE statement like 1 or 1=3D1 or NULL=3DNULL in any SQL. It is simply a= way of > preformatting a WHERE clause so you can just keep tacking AND condition > statments to it, if there is a reason to. It is lazy programming. You > should only create a WHERE clause if there are conditions that you need t= o > limit a query to. If you dont, then SELECT column1,column2 FROM tablex; = is > all you need. Not SELECT column1,column2 FROM tablex WHERE 1=3D1; That = is > just lazy programming. I've looked this up. WHERE NULL=3DNULL comes from Pear::DB/oci8.php modifyLimitQuery, not from our search library, so please continue your rant at the pear list :) It's quite tricky. Thanks for your WantedPages fix. (p.id =3D linked.linkfrom) We got this wrong for a long time now. I moved ISNULL to PearDB_mysql and fixed the AS issue in FROM. > > We can easily set another SQL TRUE statement for this branch, and we > > haven't wrote a branch optimizer yet. > > Recommendations welcome. > > I'm just improving the postgresql interface, and oracle is not very far > away. > > (foreign keys and text search improvements) > > While I cannot work out where I can contribute to this, I am looking > forward to a much better Oracle implementation and will be keen to try it > out. Most of the other fixes were based on older releases and already fixed a while ago. I just added DBAUTH_PREF_INSERT as suggested and as default. -- Reini Urban http://phpwiki.org/ |