Update SQL Fields ...

This forum is now closed as part of retiring phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

This forum is now closed due to phpBB2.0 being retired.
Post Reply
User avatar
OmegaQuest
Registered User
Posts: 76
Joined: Mon Sep 01, 2003 9:12 pm
Location: Washington, DC

Update SQL Fields ...

Post by OmegaQuest »

Automatically copy over the 'skill' and 'name' fields from phpbb_special table over to phpbb_users table where the field 'name' in phpbb_special table matchs the field 'username' in phpbb_users table

Let me know if you need any more information.
Thanks a lot

Here is what I have, but it dosent work.

Code: Select all

$sql = "SELECT u.*, rk.*
		FROM phpbb_users u, phpbb_special rk";

$username_temp = u.username;
$phone_temp = rk.phone;
$skill_temp = rk.skill;
$name_temp = rk.name;

while ( $username_temp = $name_temp )
	{
		$sql = "UPDATE phpbb_users
				SET skill = $skill_temp, name = $name_temp
				WHERE username = $name_temp";
	}
Uchiha Nick
Registered User
Posts: 424
Joined: Wed Jul 14, 2004 12:13 pm
Contact:

Post by Uchiha Nick »

exactly what is this for?
User avatar
OmegaQuest
Registered User
Posts: 76
Joined: Mon Sep 01, 2003 9:12 pm
Location: Washington, DC

Post by OmegaQuest »

I'm just trying to grab some Data from one Table and place it in another one as long as 1 field from each table matchs...

This way I can display that Info on on the left hand of the screen on their Posts...

I know how to display this if the Info is in the phpbb_users table but not in a differant Table that is Already set up LOG ago...

The good thing is Each Table, has 1 Field that has the same Value...

I'm trying to link these 2 together and then read the info from the other table. OR just copy that info over to the phpbb_users Table

Thanks
Post Reply

Return to “[2.0.x] MOD Requests”