Jump to content

Adding together 2 fetch row results


pmzq

Recommended Posts

Hy all,

I'm trying to retrieve multiple rows with the fetch_row() command in a while loop with PHP

This works fine!

Now I want to fetch some more rows with the same command from another database.

After this I want to add the row results from the first fetch to the second fetch so all rows will be in 1 variable like $row.

Does anyone have an idea how this is done is it even possible ?
or should I first join the two tables from different databases and the do the fetch_row() command ?

Hop to hear something soon!

thnx pMzQ,
Link to comment
https://forums.phpfreaks.com/topic/7717-adding-together-2-fetch-row-results/
Share on other sites

Interesting... can I ask why? You'd have to be sure that you alias the columns appropriate so that you don't get hash key collisions. In principle, there's no reason that you can't add the second row's column to $row; but how are you going to match them up? Do there share a UID, etc.?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.