order of items in a WHERE...IN clause

2008-07-28 Thread Andrew Martin
Hello, Is it permissible to order a clause such that the search term is the first item (in the clause)? standard: field1 IN (123, 654, 789) in question: 123 IN (field1, field2, field3) I am interested to know if the optimizer treats this any differently if anybody can shed any light on it (exce

Re: force row to appear at top of results using order by

2008-07-01 Thread Andrew Martin
Many thanks for the quick replies! This solution appears the most elegant: -- Forwarded message -- From: Markus Grossrieder <[EMAIL PROTECTED]> Date: 2008/7/1 Subject: Re: force row to appear at top of results using order by To: Andrew Martin <[EMAIL PROTECTED]&

force row to appear at top of results using order by

2008-07-01 Thread Andrew Martin
Hello, I have an order by question... This is the "raw" data... mysql> SELECT events_groups_id, events_groups_name FROM events_groups; +--+-+ | events_groups_id | events_groups_name | +--+-+ |1 | Personal Ev

Serializing mySQLi result resource in PHP

2008-06-09 Thread Andrew Martin
Hello, Apologies for a slightly off topic PHP related post, the php-db mailing list has not been able to help with this so far. Is it possible to serialize a MySQL(i) result resource (specifically using PHP 5)? I am looking to insert query results into the eAccelerator cache but the resource retu