473,382 Members | 1,329 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

how to find unmatched row's for one user?

Lets say:
userinfo table have (empid is Primary key):
empid=========name
100 ========= A
101 ========= B
102 ========= C
103 ========= D
104 ========= E

<---my problem is here--->
when this user (empid=100) login his account, he will see like below
{empid=100 might not see him as friend himself :) }

101 [add this user as friend] [delete this userfrom your list]
102 [add this user as friend] [delete this userfrom your list]
103 [add this user as friend] [delete this userfrom your list]
104 [add this user as friend] [delete this userfrom your list]

for example, he deleted some user from his list and other users will do so. So I am saving all records in one table.

deleted_history table doesnt have PK:
empid=========deleted_id_from_list
100 ========= 101
100 ========= 102
103 ========= 101
103 ========= 104

My question is : I want to see like below output when empid=100 login his account, then he will see only non-deleted user id: output below:
103 [add this user as friend] [delete this userfrom your list]
104 [add this user as friend] [delete this userfrom your list]

he won't see empid-101 and 102 anymore.
same for other user empid=103, he will see only 102 and 103.

I did some left join query but its giving me all records for both user(100 & 103)

my query was :
mysql> select userinfo.empid as 'ids' from userinfo Left Join deleted_history ON userinfo.empid=deleted_history.deleted_id_from_lis t where deleted_history.empid IS NULL;

I will really appreciate if some one can help me AS SOON AS POSSIBLE. because I am stuck with it and I need to submit very soon.

Thanks Again.
Nov 24 '10 #1
0 946

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Kshitij | last post by:
Hi How do I find the row I clicked on the datagird Thanks in advance.
1
by: Richard | last post by:
I have a datagrid about so high such that about 10 rows can be seen before scrolling down. Default position after displaying the grid is to show rows 1-10. If I have 100 rows in the bound table...
4
by: Gidi | last post by:
Hello, I have a dataGrid that contains customers details, i made an event that when the DataGrid is loaded the first row is marked or when some row is clicked this row is marked, how can i do...
4
by: Polaris | last post by:
Hi: Within a Windows Service, is there a way to find out if a user (any user) has already logged on to the machine ? Thanks In Advance ! Polaris
1
by: Andy | last post by:
Hello, I am building a form that allows user to enter multiple shipping addresses. As the number of shipping address is unknown at design time and different on each user. I used datagrid and...
10
by: Bande | last post by:
There is a program in VB , in which, there is a Form_QueryUnload( Cancel as Integer, UnloadMode as Integer) which would be called when the form is being closed. The UnloadMode is used to find...
1
by: ABC | last post by:
Can I find out when the user is navigating to another page? or What events will be call if the page is change to another page? I want to call clear session variables when user is navigating to...
1
by: Dica | last post by:
i'm getting an error when trying to perform a file move operation. this operation worked fine on my dev box after i granted read/write/delete perms to the asp.net user account on the folders i...
0
by: Bails | last post by:
Hi All, im in the process of teaching myself VB Express and have chosen to make a Poker Timer as my first project. The project essentially consists of 2 forms as follows: Form1 Contains a...
3
by: dhanashivam | last post by:
Hi all, I need to find the user name of the client which is supplied to the operating system (Windows OS) in my web application. Any one can say the way to find it? either by java script or...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.