ThemeForest

Retrieving table comments from mysql

1522 posts
  • Sold between 50 000 and 100 000 dollars
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Microlancer Beta Tester
  • Exclusive Author
  • Has been a member for 3-4 years
  • Europe
  • Referred between 10 and 49 users
  • Bought between 50 and 99 items
Firsh says

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..

497 posts
  • Canada
  • Sold between 1 000 and 5 000 dollars
  • Has been a member for 4-5 years
  • Exclusive Author
  • Bought between 10 and 49 items
  • Referred between 1 and 9 users
TutelageSystems says

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

1522 posts
  • Sold between 50 000 and 100 000 dollars
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Microlancer Beta Tester
  • Exclusive Author
  • Has been a member for 3-4 years
  • Europe
  • Referred between 10 and 49 users
  • Bought between 50 and 99 items
Firsh says

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.

by
by
by
by
by