I’m trying to query the comments on a table by this query:
SELECT table_comment FROM information_schema.tables WHERE table_name = 'myspecifiedname'
But it doesn’t seem to work. Any ideas?
What’s this for: I’m storing a ‘nice name’ of the tables (tables are items in the system) without _ and with ( and ) and – characters that if I included them in my table names these chars would mess them up. Or I should just create my own table for these kind of ‘settings’ and table name and nice name pairs? That seems so manual. Entering the nice name to the comments field is so easy..
Firsh, what is the MySQL error that is being returned (or just zero rows)?
It is working for me perfectly. I am running MySQL 5.0.77
Well it appears my query was good, the result fetching had an error. I ran the query in SQL maestro and checked the column name (table_comment). For some reason I wasn’t using this when outputting the result. My bad. But thanks for the confirmation that I did it right (I couldn’t find a useful page via google..) I was just tired and overlooked something. Somebody please close the thread.
- Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
- Open a support ticket if you would like specific help with your account, deposits or purchases.
- Item Support by authors is optional and may vary. Please see the Support tab on each item page.
Most of all, enjoy your time here. Thank you for being a valued Envato community member.