Forum Moderators: coopster
I need to query a table called 'members' to find all the 'userid's' that like surfing=yes
I then have to query a table called 'spent' where sid=all_the_userid's_pulled_from_the_first_query then i would like to display the total amount in the column called 'how_much'
If some one would help me i would be most grateful.
If
spent.how_much is a summarized total of spending, you would just need to join the two tables and use a WHERE condition:
SELECT * FROM members, spent
WHERE members.userid = spent.sid
AND members.surfing = 'yes'
If
how_much is not a column in the spent table, then you may need to provide more details about your table structure as scumm_bar2 stated.