mysql query help
#1

Hi

A long time ago i made a mistake by handling house table by playername instead of userid.
Its working, but i want the house table to be dealt with by userid instead.

The problem is that there is alot of houses in the table already and i just added userid.houses field now.

Quote:

Table: houses
Fields: userid, username ..

Quote:

Table: useraccounts
Fields: userid, username ..

So is it possible to make a query that gets username.houses -> SELECT userid.useraccounts -> UPDATE userid.houses to add the correct value from userid.useraccounts to userid.houses ?

I know this can be done with pawn by looping houses -> SELECT userid FROM useraccounts WHERE username = 'HouseOwner' -> then send a new query to UPDATE userid in houses. But i want to know if there is a way this can be done in 1 single query in phpmyadmin.

Thanks in advance.
Reply


Messages In This Thread
mysql query help - by Richie© - 08.03.2016, 12:22
Re: mysql query help - by zPain - 08.03.2016, 12:51
Re: mysql query help - by Vince - 08.03.2016, 13:10
Re: mysql query help - by zPain - 08.03.2016, 13:20
Re: mysql query help - by Richie© - 10.03.2016, 17:49

Forum Jump:


Users browsing this thread: 1 Guest(s)