Jump to content

Update data in one table to another?


mikeyca

Recommended Posts

Hello, I have been confused on how I can do this.

 

I have 2 tables in the same database. 

users & pollcomments

 

In the users & pollcomments both have a userid and username field.

 

I need to populate the username data from the users table into the pollcomments table if the userid in the pollcomments field equals the userid field in the users table. 

 

The poll table is populated and does contain the userid data, but currently the user field is blank for all the data in the table.

 

Thanks,

mikey

 

mysql: 4.1.20

 

Link to comment
https://forums.phpfreaks.com/topic/138515-update-data-in-one-table-to-another/
Share on other sites

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.