Hi,
I am trying to use createtale() function like the following -
<?php
include('./txtSQL.class.php');
$sql = new txtSQL('./data');
$sql->connect('root', '');
$sql->selectdb('xpressdb');
$columns = array('id' => array('type' => 'int', 'auto_increment' => 1, 'permanent' => 1),
'name' => array('type' => 'string', 'max' => 50),
'email' => array('type' => 'string', 'max' => 50));
$sql->createtable('table' => 'xpressusers2',
'columns' => $columns);
$sql->disconnect();
?>
However, when I use the execute() function it works -
<?php
include('./txtSQL.class.php');
$sql = new txtSQL('./data');
$sql->connect('root', '');
$sql->selectdb('xpressdb');
$columns = array('id' => array('type' => 'int', 'auto_increment' => 1, 'permanent' => 1),
'name' => array('type' => 'string', 'max' => 50),
'email' => array('type' => 'string', 'max' => 50));
$sql->execute('create table',
array('table' => 'xpressusers',
'columns' => $columns));
$sql->disconnect();
?>
Any idea?
thanks
