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
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.?
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.