Macwilcy1's Posts
Nairaland Forum › Macwilcy1's Profile › Macwilcy1's Posts
1 (of 1 pages)
elvis10ten: Don't worry. I have found the secret ingredient now. Would mind sharing the "secret ingredient"? It would help some of us which is what this forum is about |
spikes C: Gbam, it is so correct! Thanks very much |
spikes C: I replied this on ya old thread...meanwhile, you're doing something really wrong. Thanks In my research I saw this: Table User -------------- UserID EmailAddress Password Gender DOB Location ------------------------------------------------------ 1 bob@bob.com bobbie M 1/1/2009 New York City 2 jon@jon.com jonathan M 2/2/2008 Los Angeles 3 joe@joe.com joseph M 1/2/2007 Pittsburgh Table Friends --------------- UserID FriendID ---------------- 1 2 1 3 2 3 Is it ok? I would appreciate to know your idea. Your idea is really important to me. Thanks for your help |
Hi, I have been working on a social networking website http://www.friendsinteract.com am have challenges and I very much welcome any help. Thank you. The challenge am having is that when a user logs in, his or her own post is fetched first before other of his or her friends post is fetched. Inside the database, there is a column that contain the a user's friends username separated by comma (,) for instance - macwilcy,cy,cyril,cy1,macwilcy1,... I want to use the username to fetch post made by users ordering it by date. I initially used "SELECT * FROM table_name WHERE username = '$username' ORDER BY DATE" but it was fetching the posts starting from the first username to the last username regardless of which user's post is the latest post. I will very much appreciate your help. Thanks |
I have been working on a social networking website using php - http://www.friendsinteract.com Though am having some challenges and I very much welcome any help. Thank you The challenge am having is that when a user logs in, his or her own post is fetched first before other of his or her friends post is fetched. Inside the database, there is a column that contain the a user's friends username separated by comma (,) for instance - macwilcy,cy,cyril,cy1,macwilcy1,... I want to use the username to fetch post made by users ordering it by date. I initially used "SELECT * FROM table_name WHERE username = '$username' ORDER BY DATE" but it was fetching the posts starting from the first username to the last username regardless of which user's post is the latest post. I will very much appreciate your help. Thanks |
Thanks for the assistance. I forgot to mention that the variable $username is coming from database holding an array of values separated by comma (,). For instance $username = "macwilcy,cy,cyril,cy1,macwilcy1,...";. I want to use the username to fetch post made by users ordering it by date. I initially used "SELECT * FROM table_name WHERE username = '$username' ORDER BY DATE" but it was fetching the posts starting from the first username to the last username regardless of which user's post is the latest post. I will very much appreciate your help. Thanks |
Hello, please I need help on how to use variables when using the IN of mysql. I.e "SELECT * FROM table_name WHERE username IN ('$username') ORDER BY DATE". Please is it possible to write it that way or is there a right way of writing that. Thanks for your help |
1 (of 1 pages)
