Welcome Guest, Not a member yet? Register   Sign In
Been trying to find the solution! (help with database)
#3

[eluser]Unknown[/eluser]
i want to find were user_id = $this->session->userdata('id');

and grab all the friend_id numbers that they are connected to.

as in my table will look like this in phpmyadmin

|-user_id-|-friend_id-|-are_friends-|
34 14 1
12 23 1
9 15 1
34 19 1
34 45 1

as you can see i have multiple user_ids that equal 34 and i want to grab all the friend_id numbers that are connected with it , in this case 14,19 and 45.

and place these new numbers in a new table :

|-user_id-|-friends-|
34 14,19,45

but i also don't know how to create a table that allows multiple ids in a single entry.


Messages In This Thread
Been trying to find the solution! (help with database) - by El Forum - 06-29-2010, 05:33 AM
Been trying to find the solution! (help with database) - by El Forum - 06-29-2010, 05:46 AM
Been trying to find the solution! (help with database) - by El Forum - 06-29-2010, 05:58 AM
Been trying to find the solution! (help with database) - by El Forum - 06-29-2010, 06:06 AM
Been trying to find the solution! (help with database) - by El Forum - 06-29-2010, 07:14 AM



Theme © iAndrew 2016 - Forum software by © MyBB