Closed ckald closed 14 years ago
Try with array("CONCAT( REPEAT('—', level), ' ' , title)", 'title'), it should make an alias and make your query work :)
This helped
Jelly::select('category')
->select_array(array(
'id',
DB::expr("CONCAT( REPEAT('—', `level`), ' ', `title`) as title")
)
)
->order_by('path')->execute()->as_array();
But is there any way to extract this like associative array(id => title)?
ckald: as_array('id', 'title')
this is the standard from KO DB.
In fact I'm closing this as it is not an actual issue with Jelly
I need to run query like this:
And I think it is obvious to do it this way:
This causes error
The question is: does Jelly supports this feature, or i should invent it?