Mindaugas Riauba wrote:


  While writing web application I found that it would
be very nice for me to have "null" WHERE clause. Like
WHERE 1=1. Then it is easy to concat additional
conditions just using $query . " AND col=false" syntax.

  But which of the possible "null" clauses is the fastest

Rather than this approach, keep a flag which tells you whether or not it is first where condition. If it is not first where condition, add a 'and'. That would be simple, isn't it?


---------------------------(end of broadcast)--------------------------- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Reply via email to