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

From: Date: Thu, 18 Oct 2001 19:38:31 +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-71618@lists.php.net to get a copy of this message
On Fri, 19 Oct 2001 12:17:48 -0700, Tom Beidler wrote: >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. try: ORDER BY make.make='no make specified',make.make,model.model >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) > > -- Mark, maggelet@mminternet.com on 10/18/2001

« previous php.general (#71618) next »