If I understand you correctly you like to have the result for the specific table in
your mail to look like this:
200 <-- this is the total price of item1 (1 * 200)
150 <-- this is the total prices of partAs (2 * 75)
300 <-- this is the total price of partBs (2 * 150)
for this you are better off to use the following statement:
mysql> Select SUM(price) from Your_Table where CatNum in ('item1', 'partA', 'partB')
group by CatNum;
Please note that ('item1', 'partA', 'partB') is a set, so repeating the elements will
have no effect, i.e. ('item1', 'partA', 'partB') is identical to ('item1', 'partA',
'partB', 'partB').
Thanks
Nasser.
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php