Re: Appending query result sets?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2009/2/8 Skip Evans <skip@xxxxxxxxxxxxxxxxx>:
> Is it possible to append a result query from one call to mysql_query() to
> the end of another if the specified fields are identical?
>
> Something like that would accomplish ths?
> $r1 = mysql_query('some sql');
> $r2 = mysql_query('some sql');
>
> $r3 = $r1.$r2;
>
> I suppose they could be read into an array then output that way, but I was
> hoping to more easily just append the result sets.

Best place to do this is in the SQL query with a UNION.

    http://dev.mysql.com/doc/refman/5.0/en/union.html

-Stuart

-- 
http://stut.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux