Programming Help On Specific Projects > PHP Problem Solvers - Get Help Here

PHP Comparison

(1/1)

NaniG:
Hi 2 all,

My problem is like this....

Table Name : Test

keys1                     
801
802                           
803                           
804                           
805                           
806                           

How i can compare column1 values with same column1 values (compare each and every value with in the test table by using MySQL select query.)

for example :-

select * from test where keys1='801' and Keys1!='801';
select * from test where keys1='801' and Keys1!='802';
select * from test where keys1='801' and Keys1!='803';
select * from test where keys1='801' and Keys1!='804';
select * from test where keys1='801' and Keys1!='805';  etc....

select * from test where keys1='802' and Keys1!='801';
select * from test where keys1='802' and Keys1!='802';
select * from test where keys1='802' and Keys1!='803';
select * from test where keys1='802' and Keys1!='804'; etc....

etc.....

Please any one help me out from this problem.
Thanx in adv.

cwarcarblue11:
OK, I'm not sure I understand what you are trying to get... But one thing is wrong with your code. In sql, the logical not operator is <>, not !=

Navigation

[0] Message Index

Go to full version