How do I echo out the first item of every table in a adatabase. I know how to do it in one, but not in all. Do I have to use mysql_list_tables() and then get first item with LIMIT? I tried mysql_list_tables(), but it didn't work for some reason.
Could someone help me please?
Make a query to information_schema.TABLES
(itself a table) to get a list of tables in your database. Then use that list of tables in your PHP code to drive the generation of queries to each table.
Be careful here. The notion of "first" row in a table is surprisingly fuzzy in the world of RDMSs. If you include ORDER BY
you'll have control over it..