Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
Thread: mysql join and loop via php
08-29-2009, 10:48 PM #1
- Join Date
- Mar 2009
- Thanked 3 Times in 3 Posts
mysql join and loop via php
i was wonderinig if there is a way to loop two tables in php. let me explain how it would need to work. i have tried a thousand time to get it to work but i cant. The script is part of my friends system that i made. when the user sends a friend request the other user recieves it. the mysql is set up so that is posts..
then once the person approves it deletes the request from the database and insert a row into the friends table like so...
FRIENDID the friends id in the users table
the system inserts to rows and both are opposite. for example..
1 cuakster slappyjaw "time" 2
2 slappyjaw cuakster "time" 1
and that the way it is. so when i would create the php i would make it so that there was a connection to the friends table and the users table... ughh so i think i might have made it to complicated can someone please help me find a way to make a page display the friends a user has. thank you all
08-30-2009, 02:16 AM #2
avoid using same names for fields
instead table field id name the field table_id, and other maybe users_id...