You are here: find differences between two mysql_query results HELP « PHP SQL « IT news, forums, messages
find differences between two mysql_query results HELP

Posted by Madd_Matt on 05/29/06 11:11

When I type an agentnum and hit submit at will look up that agentnum
and tell you what skill set (msp_sk,ste_sk,wash_sk,ectect) they are not
a part of.

For Example
the first statement I have been ussing is this. it Tells me what they
DO have.
SELECT queue FROM agentqueue_table WHERE agentnum='12345' GROUP BY
queue;
The result is
+-----------+
| queue |
+-----------+
| msp_sk |
| ste_sk |
+------------+

The second statment is, it tells me what all the skill sets are.
SELECT queue FROM agentqueue_table GROUP BY queue;
+-------------+
| queue |
+-------------+
| msp_sk |
| ste_sk |
| wash_sk |
+-------------+

I want to compare the two results and know the difference is wash_sk

I need to do this dynamicly as well. Lets say I do another agentnum
lookup with agent 54321 and his results are as followed
+-----------+
| queue |
+-----------+
| msp_sk |
| wash_sk |
+------------+
and compare it to again,
SELECT queue FROM agentqueue_table GROUP BY queue;
+-------------+
| queue |
+-------------+
| msp_sk |
| ste_sk |
| wash_sk |
+-------------+
The answer I want to get then is ste_sk

If I am going about this all wrong please let me know!
I have spent all day trying to find a way to do this and i can't! I am
going nuts... Please help!

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация