It shouldn't be too hard, especially if you have the script code which should have the db table names and cats etc.
You can create a table right from the mysql> prompt or write a simple script for it. Do a web search for basic mysql commands that's how I learned to do it.
Example php code:
if ($db= mysql_connect($YOURHOST, $MYSQLUSER, $MYSQLPWD)){
mysql_select_db($DATABASENAME, $db);
}
else echo 'database connection failure!';
$sql="CREATE TABLE items(
id int(11) DEFAULT '0' NOT NULL auto_increment,
name varchar(255) NOT NULL,
ip varchar(15) NOT NULL default '',
cat int(11) DEFAULT '0' NOT NULL,
pwd varchar(24) NOT NULL,
approved tinyint(4) NOT NULL default '0',
date int(11) NOT NULL default '0',
PRIMARY KEY (id))";
if (mysql_query($sql, $db)) echo "'items' table successfully installed<br>";
else $err.= "<b>items table: </b>".mysql_error()."<br>";
|