ptb_listUnique
Finds all unique values in given field.
Syntax
$var = ptb_listUnique($database, $fieldname);
Syntax description
- $database
- variable containing connected database
- $fieldname
- name of the field, for which unique values should be found
Return
This function returns one-dimentional array (this is going to change in the next pTB version, though!) or null if database is empty.
Sample(s)
$authors = ptb_listUnique($myDatabase, 'author');
If you need to use this function, it may be a sign you should think about changing structure of your database :-)