ea-Geieradmin
[ class tree: ea-Geier ] [ index: ea-Geier ] [ all elements ]

Source for file extractSQL.php

Documentation is available at extractSQL.php

  1. <?php 
  2. /**
  3.  * admin functions for sql database
  4.  *
  5.  * LICENSE:
  6.  * This program is free software; you can redistribute it and/or modify
  7.  * it under the terms of the GNU General Public License as published by
  8.  * the Free Software Foundation; either version 2 of the License, or
  9.  * (at your option) any later version.
  10.  * This program is distributed in the hope that it will be useful,
  11.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.     See the
  13.  * GNU General Public License for more details.
  14.  * You should have received a copy of the GNU General Public License along
  15.  * with this program; if not, write to the Free Software Foundation, Inc.,
  16.  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  17.  *
  18.  * @package       ea-Geier
  19.  * @subpackage admin
  20.  * @author       m2mtech <tech@m2m.at>
  21.  * @copyright  2007 m2m server software gmbh
  22.  * @license       http://www.gnu.org/licenses/gpl.html GNU General Public License Version 2
  23.  * @version       $Id: extractSQL.php 75 2007-05-25 16:47:21Z m2mtech $
  24.  * @link       http://www.ea-geier.at/
  25.  */
  26.  
  27. chdir('../')// set root directory
  28.  
  29. /**
  30.  * environment configuration
  31.  */
  32. include_once('code/config.php');
  33.  
  34. /**
  35.  * load adobdb libraries
  36.  */
  37. require_once(eaADODB_DIR 'adodb.inc.php');
  38. require_once(eaADODB_DIR 'adodb-xmlschema03.inc.php');
  39.  
  40. /**
  41.  * connect to database
  42.  */
  43. $db ADONewConnection($conf['dsn']);
  44. $db->debug true;
  45.  
  46. /**
  47.  * extract database scheme
  48.  */
  49. $schema new adoSchema($db)
  50. print_r($schema->ExtractSchema(true))
  51.  
  52. /**
  53.  * output function forwarding to error_log
  54.  *
  55.  * @ignore
  56.  * @param    string    $msg        error message
  57.  * @param    boolean $newline    send new line command
  58.  */
  59. function eaADODBerrorLog($msg$newline true{
  60.     error_log(strip_tags($msg));
  61.     return true;
  62. }
  63.         
  64. ?>

Documentation generated on Sun, 09 Sep 2007 17:08:44 +0200 by phpDocumentor 1.3.1