Hi, why are you trying to order by a statement instead of a field? What are
you trying to accomplish. Do you want to order by the status? display only
the tuples with status as new? order by status, but having new first and the
others following? It's not clear what you are trying to do. Please give more
information.
AZEL wrote:
>
> hi,
> but $select->where('b.status = ?', 'new')->order('b.status ASC'); and
> $select->order("b.status = 'new'"); has 2 differnt results.
> $select->order("b.status = 'new'"); sort by status where is equal to 'new'
> at first.
>
> On Wed, Oct 8, 2008 at 3:33 PM, Tom Graham <[EMAIL PROTECTED]> wrote:
>
>> Hi,
>>
>> Try something like: $select->where('b.status = ?',
>> 'new')->order('b.status
>> ASC');
>>
>> On 8 Oct 2008, at 13:22, Elvin Şiriyev wrote:
>>
>> hi,
>>
>> i can't use "order by" like that:
>>
>> $select->order("b.status = 'new'");
>>
>> Error Message : *Fatal error*: Uncaught exception
>> 'Zend_Db_Statement_Mysqli_Exception' with message 'Mysqli prepare error:
>> Unknown column 'b.status = 'new'' in 'order clause'' in ...
>>
>> Thanks for helps,
>>
>> --
>> Elvin Şiriyev
>>
>>
>>
>
>
> --
> Elvin Şiriyev
>
>
--
View this message in context:
http://www.nabble.com/Zend_Db_Select-Order-By-tp19877596p19898299.html
Sent from the Zend Framework mailing list archive at Nabble.com.