I'll try that one again....

I have a query:
$sql = "SELECT * FROM contacts ORDER BY ContactType";

There are two types of contacts: 

* Commissioners
* Staff

As they are ordered by the ContactType then 'Commissioners' are
displayed first followed by 'Staff'.
  
I'd like to be able to display a heading on the page at the point of the
FIRST instance of 'Commissioners' and at the FIRST instance of 'Staff'.
As I'm using a while loop in my PHP script then at present such a
heading would be displayed atop *each* item would it not?

I think I need to use some kind of COUNT() but am unsure how to deploy
it.
Can anyone help me out?

Cheers.
Russ

Mr Russ Michell
Web Applications Developer

Itomic.com 
Email: [EMAIL PROTECTED] 
Tel: +61 (0)8 9321 3844 
Fax: +61 (0)8 6210 1364 
Post: PO Box 228, Innaloo, WA 6918, Australia 
Street: Suite 24, 158 William St, Perth, WA 6000, Australia

"No proof of existence is not proof of non-existence."
(Physicist: Stanton T. Friedman on Debunking Ufology)


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to