Re: how to move one element of an array to the end of the array

From: Date: Fri, 19 Oct 2001 19:17:48 +0000
Subject: Re: how to move one element of an array to the end of the array
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-71613@lists.php.net to get a copy of this message
Trying to use the solution without positive results First need to clarify, I'm actually trying to order the model. Here's my original query; $make_query = "SELECT make.make, model.model, application.make_id, application.model_id FROM application INNER JOIN make ON make.id = application.make_id INNER JOIN model ON model.id = application.model_id WHERE application.year_in <= $value AND application.year_out >= $value AND application.make_id != 1 ORDER BY make.make, model.model"; here's what I tried to change it too $make_query = "SELECT make.make, model.model, application.make_id, application.model_id FROM application INNER JOIN make ON make.id = application.make_id INNER JOIN model ON model.id = application.model_id WHERE application.year_in <= $value AND application.year_out >= $value AND application.make_id != 1 ORDER BY make.make, if(left(model.model,7)='No model specified','zzzzzzzz',model.model)"; I get the same results with both. If you can, let me know where I strayed. Also, out of curiosity, is it faster to do it in MySQL rather then PHP? Thanks, Tom > From: "Mark Charette" <charette@sneezy.org> > Date: Fri, 19 Oct 2001 12:34:24 -0500 > To: "Tom Beidler" <tom@orbittechservices.com>, "php list" > <php-general@lists.php.net> > Subject: RE: [PHP] how to move one element of an array to the end of the array > > if(left(Make,7)='no make','zzzzzzzz',Make)

« previous php.general (#71613) next »