do you know that comments in mySQL database/table cannot be retrieved using predefined mySQL query, like create or alter ?
alternately, you can find these commands in database information_schema (by default, mySQL create this database). In this database, find column ‘TABLE_COMMENT’ in a table named ‘TABLES’. Here, you will find comments of every table you create before. Also, you can find another useful information about your database here.
I have created a class that can handle several simple mySQL management activities like that, I call this class mysqlix.
visit : http://antonrifco.users.phpclasses.org/mysqlix to get more information about this class
Sometimes, when you play (:p) with mySQL database using php script, want to retrieve tables comment, and after several hours reading mysql or php manual, but doesn’t find any useful clue. You feel bored, and frustate to this php-mysql technology. I recommend you to use this class (mysqlix), and implement it to your project.
This class extends popular php5 base class, mysqli, in a way that provide some useful functions, like retrieve table (or tables in a database) ‘s comment(s), create/drop trigger, create/drop tables, create/drop database, simple insert and update, advanced select query, and securing your defined transaction. More functions will be released soon. You, also, can modify it to satisfy your project’s database requirement.
This is my first open source class, licensed under one of open source licence.
You can download it on http://www.phpclasses.org/browse/package/4044/download/targz.html (.tar.gz), or http://www.phpclasses.org/browse/package/4044/download/zip.html (.zip)
read more information about this class on : http://www.phpclasses.org/trackback/browse/package/4044.html, class documentation on : class documentation
feel free to use it !