![]() |
| |||||||
| Mysql Forum Mysql Forum |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
| |||
| need in sql statement in mysql?
Hi, I am want on sql statement for my table. I am having one table call friends in that table i will store userid and friendid like this..... iUserID iFriendID 1 3 1 2 1 4 2 4 3 6 6 2 5 7 7 8 How can i get parent and child record suppose my id is 3 i have to get userid "3"'s parent records and child record. How can i get this all records.... 1 3 1 2 1 4 2 4 3 6 6 2 Thanks in advance when i query like this it will display.. select * from tbl_friend where (iUserID=3 or iFriendID=3) iUserID iFriendID 1 3 3 6 Not like this i want when i query i want like this.... iUserID iFriendID 1 3 1 2 1 4 2 4 3 6 6 2 i want like this.. iUserID iFriendID 1 3 1 2 1 4 2 4 3 6 6 2 |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Is the below statement true ? I read it on Wikipedia.? | Zach | Wikipedia Forum | 8 | 07-12-2008 01:09 AM |
| Can anybody help me on this C++ program using switch case statement. And also... | joycee | C++ Forum | 0 | 06-04-2008 02:49 AM |
| To build database using Mysql what is the best tool: Mysql query broswer or | George | Mysql Forum | 1 | 05-18-2008 10:25 PM |
| where i have to place mysql driver in apache tomcat while connecting mysql | sunny | Mysql Forum | 0 | 01-12-2008 06:54 PM |
| How to access MYSQL database Using PHP in Linux and how to configure Mysql and | satya_ils | Mysql Forum | 0 | 01-08-2008 10:42 AM |