Hi Herman,
I am myself a pro at PHP, but I think, this would be of some help to you.
To create a Table, you won't find a comand in PHP. However what you do is build a
CREATE TABLE statement and pass that as an
argument to mysql_query() function to do the job.
Here is a small example:
my
Check your MySQL docs for exact syntax on table creation ... then:
Connect to the database
Build a SQL statement that does what you want:
$sql = "CREATE TABLE blah, blah ..";
Execute the statement:
$result = mysql_query( $sql );
and check for errors, etc.
Alternately, if this is a
At 08:00 AM 4/25/01 +0200, Herman Wapenaar wrote:
>I am using a website based in the states to which is PHP enabled. I am
>using MySQL.
>
>Is there a way to create a table with PHP? I do not see any command for that.
Well, as an Oracle administrator, I may be going out on a limb here
regardi
Hi Herman,
Try something like this...
$dbname = "my_db";
$tablename = "my_table";
$table_def = "item_id MEDIUMINT DEFAULT '0' NOT NULL AUTO_INCREMENT,";
$table_def .= "item_name VARCHAR(50) BINARY NOT NULL,";
$table_def .= "lastaccessed TIMESTAMP(14),";
$table_def .= "PRIMARY KEY (item_id),";
$