MySQL Forums
Forum List  »  Connector/ODBC

Database table
Posted by: Eugene Fernandez
Date: September 26, 2013 11:10PM

Hi,
I am able not able create a table with following entreis in mysql database.php5

<?php include_once("php_includes/db_e.php"); $tbl_OPD = "CREATE TABLE IF NOT EXISTS OPD (
pid INT(11) NOT NULL AUTO_INCREMENT,
first Name VARCHAR(16) NOT NULL,
last Name VARCHAR(16) NOT NULL,
dob DATETIME NOT NULL,
gender ENUM('m','f') NOT NULL,
email VARCHAR(255) NOT NULL,
age INT(2) NOT NULL,
address VARCHAR(255) NOT NULL,
city VARCHAR(255) NOT NULL,
category ENUM('A','B','C','Student','Employee') NOT NULL DEFAULT 'A',
mobile INT(11) NOT NULL,
ref id INT(11) NULL,
payment Type ENUM('Cash','Cheque','Online',''DD') NOT NULL DEFAULT 'Cash',
time Slot DATETIME NOT NULL,
center VARCHAR(255) NOT NULL,
treatment VARCHAR(255) NOT NULL, NOT NULL,
appointment DATETIME NOT NULL,
docterCode ENUM('1','2','3') NOT NULL,
ip VARCHAR(255) NOT NULL,
signup DATETIME NOT NULL,
lastlogin DATETIME NOT NULL,
PRIMARY KEY (pid)
)"; $query = mysqli_query($db_e, $tbl_OPD); if ($query === TRUE) { echo "<h3>user table created OK :) </h3>"; }
else { echo "<h3>user table NOT created :( </h3>"; } ?>

Options: ReplyQuote


Subject
Written By
Posted
Database table
September 26, 2013 11:10PM
September 30, 2013 02:06AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.