... Thanks though.
Yes, I had thought of that, except the data types and keys are different. I did manage to get an example of the returned arrays from print_r():
QUERY 1:
Array (
[CategoryID] => 32
[categoryDescr] => Array (
[0] => English
[1] => Music )
[categoryParent] => )
QUERY 2:
Array (
[ContentID] => 2
[contentTitle] => World Playground: Starter Kit
[contentDescr] => Includes the same contents as the curriculum kit but only contains two passport journals.
[contentLength] => 00:20:00
[contentFileName] =>
[contentYear] => 1997
[contentTypeDescr] => DVD
[contentTypeIcon] => dvd.gif
[ContentTypeID] => 3 )
Yes, a UNION would work if both queries queried tables with the same datatypes in the same order (?).
I did try a array_merge_recursive() and this is what I got:
Array (
[0] => 32 # Query one
[1] => English
[2] =>
[3] => 2 # Query two
[4] => World Playground: Starter Kit
[5] => Includes the same contents as the curriculum kit but only contains two passport journals.
[6] => 00:20:00
[7] =>
[8] => 1997
[9] => DVD
[10] => dvd.gif
[11] => 3 [12] => Music )
Having slept on the subject, I wonder if I can "concatenate" the two results something like:
Query one
$result = pg_exec("SELECT blah, blah, blah... FROM table1...");
#Query two
$result = pg_exec( "SELECT blah, blah, blah... FROM table2...");
Then return the rows in some fashion:
for($i=$start;$i<$end;$i++){
$row = pg_fetch_array($result,$i,PG_ASSOC);
First Query results
$CategoryID = $row["CategoryID"];
...
Second query results
$ContentID = $row["ContentID"];
...
<format the info into the table rows>
}
Question is, does anyone think that using $result in both queries allow the second query results to append to the first query results (being $result should be in esscense an ARRAY to begin with), or would the second query results overwrite the first?
I'll experiment too. But if anyone has any experience.... HELP!
Thanks again!
-Wes Yates