[PHP-DB] Assistance Urgent.

2001-12-12 Thread Bzdpltd
Hi I am new to this list and need some help with PHP and MYSQL. We have a database that has lots of fields in the table. What we are trying to do is get specific results, i will explain. Basicall we need to be able to retrieve the total number of records in the database but for individual entr

Re: [PHP-DB] Assistance Urgent.

2001-12-12 Thread Russ Michell
To get the options: $sql = "SELECT DISTINCT related_discipline FROM ORDER BY options"; To get the total number of options: $sql = "SELECT COUNT(related_discipline) FROM "; To get the number of entries for each option 'RAIL' for example: $sql = "SELECT COUNT(related_discipline) FROM WHERE r

Re: [PHP-DB] Assistance Urgent.

2001-12-12 Thread DL Neil
Barry, > We have a field named: related_discipline which contains 1 of 12 different >disciplines. So for example we have Rail which could be in the field, or Utilities and so on.. what we need to do is know how many of each there are in the database, I am still developing my knowledge of PHP an