Re: Appending query result sets?
| From: | Skip Evans | Date: | Sun, 08 Feb 2009 18:50:41 +0000 |
| Subject: | Re: Appending query result sets? | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-287932@lists.php.net to get a copy of this message | ||
Oh, yeah, that's fine. I knew I could od it with arrays, but also looked to see if there was any way to just do an append, and I also need to sort them as well, so maybe I better get back to figuring out a join.
Skip
Ashley Sheridan wrote:
On Sun, 2009-02-08 at 12:37 -0600, Skip Evans wrote:-- ==================================== Skip Evans Big Sky Penguin, LLC 503 S Baldwin St, #1 Madison WI 53703 608.250.2720 http://bigskypenguin.com ------------------------------------ Those of you who believe in telekinesis, raise my hand. -- Kurt VonnegutAshley Sheridan wrote:Well if a join is not an option, what about something like this: $r1 = mysql_query('some sql'); $r2 = mysql_query('some sql'); $results = Array(); while($row = mysql_fetch_array($r1)) {Can you not take this to the SQL itself, like maybe using some form of join on the query.I've been trying that, and frankly gave up, being whipped into submission and having to admin I'm not an expert DBA, but I hesitated to post the queries lest I be flamed for posting off-topic. -- ==================================== Skip Evans Big Sky Penguin, LLC 503 S Baldwin St, #1 Madison WI 53703 608.250.2720 http://bigskypenguin.com ------------------------------------ Those of you who believe in telekinesis, raise my hand. -- Kurt Vonnegut$results[] = $row;} while($row = mysql_fetch_array($r2)) {$results[] = $row;} Ash www.ashleysheridan.co.uk