List all content types
To build a list of all your content types in a Drupal 6 site, use an SQL query like so:
SELECT * FROM `node_type`
The values in the type
column in the results you get, corresponds to the machine name for each of the content types you have in your site.
List all nodes of a particular content type
Here is an SQL query to display a list of nodes of content type story
in a Drupal 6 site:
SELECT * FROM `node` WHERE `type` = 'story'
Change story
to the machine name of your particular content type (= any of the values in the type
column from the first SQL above).