View Full Version : RPG Query 3 Tabels so confused. (Urgent)

Lee Stevens
01-17-2007, 04:15 PM
Tabels: user_accounts, user_items & game_items.

Discription of Tables:
User_accounts: Need to get uername and exprience.
User_items: From user_items grad the ID of user items (itemid 1-4)
game_items: from the user_items id 1-4 get the stats from game_items useing the id's

Then ad all the exprience from the game_items to current exprience then update it.

Sounds really hard i've had a few go but i carnt figer it out.

01-17-2007, 06:46 PM
so show us what you have attempted and you can most likely get a solution to what you are looking for.

Lee Stevens
01-17-2007, 07:15 PM
Well, so fair i got this:

$query = mysql_query("SELECT u.username, u.experience, i.itemid1, i.itemid2, i.itemid3, i.itemid4 FROM user_accounts u, user_items i WHERE i.username = u.username") or(die(mysql_error()));

But i still gotta get it to get the item from game_items useing the itemid1-4.

But i wont the itemid 1-4 to represent the id for the game_items ID. so i need to modify that SQL Statment