Server IP : 202.29.229.35 / Your IP : 18.189.32.37 Web Server : Apache System : Linux aapanel2 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64 User : www ( 1001) PHP Version : 5.5.38 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /www/wwwroot/www.ivecr2.ac.th/stdcard/adodb/tests/ |
Upload File : |
<?PHP // V4.50 6 July 2004 error_reporting(E_ALL); include_once( "../adodb.inc.php" ); include_once( "../adodb-xmlschema.inc.php" ); // To build the schema, start by creating a normal ADOdb connection: $db = ADONewConnection( 'mysql' ); $db->Connect( 'localhost', 'root', '', 'schematest' ); // To create a schema object and build the query array. $schema = new adoSchema( $db ); // To upgrade an existing schema object, use the following // To upgrade an existing database to the provided schema, // uncomment the following line: #$schema->upgradeSchema(); print "<b>SQL to build xmlschema.xml</b>:\n<pre>"; // Build the SQL array $sql = $schema->ParseSchema( "xmlschema.xml" ); print_r( $sql ); print "</pre>\n"; // Execute the SQL on the database //$result = $schema->ExecuteSchema( $sql ); // Finally, clean up after the XML parser // (PHP won't do this for you!) //$schema->Destroy(); $db2 = ADONewConnection('mssql'); $db2->Connect('localhost','sa','natsoft','northwind') || die("Fail 2"); $db2->Execute("drop table simple_table"); print "<b>SQL to build xmlschema-mssql.xml</b>:\n<pre>"; $schema = new adoSchema( $db2 ); $sql = $schema->ParseSchema( "xmlschema-mssql.xml" ); print_r( $sql ); print "</pre>\n"; $db2->debug=1; $db2->Execute($sql[0]); ?>