A mysqldump parser which returns table structure in an associative array.
The array contains the table name, field name(s), primary key(s), default value and data type.
By : deecodameeko
<?
/****************************************************************************************************************** *Date: December 13, 2005 *Author: Dan Cochran * *Description: This will parse a mysql schema. All table definitions found will be returned . * What you get... Primary KEY(s), table_name, field type, field name and default value. * *email me with question or comments/bugs @ dan@deecodameeko.com *see it in action: http://deecodameeko.com/code/dbClassBuilder/ *Disclaimer: *Copyright (C) 2005 Dan Cochran * *This program is free software; you can redistribute it and/or *modify it under the terms of the GNU General Public License *as published by the Free Software Foundation; either version 2 *of the License, or (at your option) any later version. * *This program is distributed in the hope that it will be useful, *but WITHOUT ANY WARRANTY; without even the implied warranty of *MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *GNU General Public License for more details. * *You should have received a copy of the GNU General Public License *along with this program; if not, write to the Free Software *Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ******************************************************************************************************************/
DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.