Following is my table structure:
CREATE TABLE `order` (
`ID` BIGINT(20) NOT NULL AUTO_INCREMENT,
`RenterRole_ID` INT(11) NULL DEFAULT NULL,
`CreationTime` DATETIME NULL DEFAULT NULL,
`BeginRentingDate` DATETIME NULL DEFAULT NULL,
`EndRentingDate` DATETIME NULL DEFAULT NULL,
`TripStartDate` DATETIME NULL DEFAULT NULL,
`TripEndDate` DATETIME NULL DEFAULT NULL,
`DeliveryDetails` VARCHAR(255) NULL DEFAULT NULL,
`ReturningDetails` VARCHAR(255) NULL DEFAULT NULL,
`SpareSpotBatteries` INT(11) NULL DEFAULT NULL,
`spareInReach15Batteries` INT(11) NULL DEFAULT NULL,
`Remarks` TEXT NULL,
`OrdersCenter_ID` INT(11) NOT NULL DEFAULT '100',
`HashedCCNumber` VARCHAR(255) NULL DEFAULT NULL,
`CCExpiration` DATETIME NULL DEFAULT NULL,
`CCHolderName` VARCHAR(255) NULL DEFAULT NULL,
`CreatingController` VARCHAR(255) NULL DEFAULT NULL,
`Debug` BIT(1) NOT NULL DEFAULT b'0',
`TravelInsuranceOffer` BIT(1) NULL DEFAULT b'0',
`DeviceInsurance` BIT(1) NULL DEFAULT b'0',
`OrdersCenterRemarks` TEXT NULL,
`Rivhit` VARCHAR(100) NULL DEFAULT NULL,
`Invoice` VARCHAR(100) NULL DEFAULT NULL,
`Payment` VARCHAR(200) NULL DEFAULT NULL,
PRIMARY KEY (`ID`),
INDEX `FK_OrderOrdersCenter_idx` (`OrdersCenter_ID`),
INDEX `FK_OrderRenterRole_idx` (`RenterRole_ID`),
CONSTRAINT `FK_OrderOrdersCenter` FOREIGN KEY (`OrdersCenter_ID`) REFERENCES `orderscenter` (`ID`),
CONSTRAINT `FK_OrderRenterRole` FOREIGN KEY (`RenterRole_ID`) REFERENCES `renter_role` (`ID`)
)
when i try to INSERT data by following code:
$query = "INSERT INTO order (RenterRole_ID) VALUES (?)";
$stmt = $mysqli->prepare($query);
if (false === $stmt) {
echo 'prepare() failed: ' . htmlspecialchars($mysqli->error);
die();
}
$stmt->bind_param('i',$newRenterId);
if (false === $bind) {
echo 'bind_param() failed: ' . htmlspecialchars($stmt->error);
die();
}
$stmt->execute();
$newOrderId = $stmt->insert_id;
$stmt->close();
cause following error:
prepare() failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'order (RenterRole_ID) VALUES (?)' at line 1
in other table INSERT code is working good only order table having issues.
Related
I am working on creating table in to my database with mysql and here is my code:
mysqli_query($link, "CREATE TABLE IF NOT EXISTS `review` (
`clients_id` int(15) NOT NULL AUTO_INCREMENT,
`client_id` varchar(150) NOT NULL DEFAULT '',
`rating` tinyint(2) NOT NULL DEFAULT '0',
`proj_date` date NOT NULL DEFAULT '0000-00-00',
`proj_desc` text NOT NULL DEFAULT '',
`photoname` text NOT NULL,
`companyname` text NOT NULL,
`feedback` text NOT NULL,
`status` tinyint(1) NOT NULL DEFAULT '0',
`emailid` varchar(100) NOT NULL DEFAULT '',
`customratings` varchar(100) NOT NULL DEFAULT '',
`photo_option` varchar(100) NOT NULL DEFAULT '',
`title` varchar(100) NOT NULL DEFAULT '',
`citation` varchar(100) NOT NULL DEFAULT '',
`date_option` varchar(100) NOT NULL DEFAULT '',
`rating_option` varchar(100) NOT NULL DEFAULT '',
PRIMARY KEY (`clients_id`),
FULLTEXT KEY `feedback` (`feedback`)
) ENGINE=MyISAM AUTO_INCREMENT=1") or mysqli_error($link);
But this is not reflecting into my database ? Why were I may be going wrong ?
but I tried creating other table with the following code
mysqli_query($link, "CREATE TABLE IF NOT EXISTS `setting` (
`id` int(11) NOT NULL auto_increment,
`script_url` text NOT NULL,
`date` varchar(4) NOT NULL,
`rateing` varchar(4) NOT NULL,
`photo` varchar(4) NOT NULL,
`dateformat` varchar(4) NOT NULL,
`page_limit` int(4) NOT NULL,
`proj_desc` varchar(4) NOT NULL,
`companyname` varchar(4) NOT NULL,
`text_color` varchar(255) NOT NULL,
`citation_color` varchar(255) NOT NULL,
`bg_color` varchar(255) NOT NULL,
`border_color` varchar(255) NOT NULL,
`ratingsformat` varchar(250) NOT NULL,
`rating` varchar(250) NOT NULL,
`customratings` varchar(250) NOT NULL,
`speed` varchar(250) NOT NULL,
`pagination` varchar(250) NOT NULL,
`version` varchar(250) NOT NULL,
`global_option` varchar(250) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=0;
") or mysqli_error($link);
it is being created correctly and both the tables are in the same file
No you cannot create table using an insert statement.
There are four types of SQL statements:
DML (DATA MANIPULATION LANGUAGE)
DDL (DATA DEFINITION LANGUAGE)
DCL (DATA CONTROL LANGUAGE)
TCL (TRANSACTION CONTROL LANGUAGE)
DML is your SELECT, INSERT, UPDATE and DELETE statements...
DDL is you your CREATE, ALTER and DROP statements.
See more info about types of SQL statements
In order to insert data in your table, first you need to create it.
How to create sql table from php
No. "INSERT INTO" used to insert the data to existing table only.You should create the table with respective column before try to insert the values.
Or you can check the table exist or not before going insert."If exists" u can insert the value else just create and insert the values.
This worked for me but I don't know how?
I just removed DEFAULT '' present while creating review table and table just got created
Here is edited code
mysqli_query($link, "CREATE TABLE IF NOT EXISTS `review` (
`clients_id` int(15) NOT NULL AUTO_INCREMENT,
`client_id` varchar(150) NOT NULL,
`rating` tinyint(2) NOT NULL,
`proj_date` date NOT NULL,
`proj_desc` text NOT NULL,
`photoname` text NOT NULL,
`companyname` text NOT NULL,
`feedback` text NOT NULL,
`status` tinyint(1) NOT NULL,
`emailid` varchar(100) NOT NULL,
`customratings` varchar(100) NOT NULL,
`photo_option` varchar(100) NOT NULL,
`title` varchar(100) NOT NULL,
`citation` varchar(100) NOT NULL,
`date_option` varchar(100) NOT NULL,
`rating_option` varchar(100) NOT NULL,
PRIMARY KEY (`clients_id`),
FULLTEXT KEY `feedback` (`feedback`)
) ENGINE=MyISAM AUTO_INCREMENT=1") or mysqli_error($link);
When I run the following query
$sql ="SELECT * FROM user_info JOIN Notifications ON user_info.user_info_id =Notifications.Sender_id AND Notifications.STATE=0 LIMIT 1";
$query=mysqli_query($con,$sql);
$num_rows=mysqli_num_rows($query);
$message=''
if($num_rows > 0){
$con=mysqli_fetch_assoc($query);
switch ($con['Notification_Type']){
case'events':
$var="Notifications".$con['user_info_id'];
$sql_shown="SELECT *FROMevent WHERE event.notification_shown = 0 AND event.user_info_id='$var'LIMIT 1";
$query_vi=mysqli_query($con,$sql_shown);
$num_rows_vi=mysqli_num_rows($query_vi);
$message.=$con['Sender_id']."has created a Event";
echo $message;
break;
}
}
I get the following error:
mysqli_query() expects parameter 1 to be mysqli, array given in
This is my user table:
CREATE TABLE IF NOT EXISTS user_info(
user_info_id INT(11) NOT NULL AUTO_INCREMENT,
u_first_name VARCHAR(255) NOT NULL,
u_last_name VARCHAR(255) NOT NULL,
u_email VARCHAR(255) NOT NULL,
u_mobile VARCHAR(255) NOT NULL,
role ENUM('1yearM','1yearN','1yearR','1yearU','1yearS','2M','2R','2N','2U','2S','3M','3R','3N','3U','3S','4M','4R','4N','4U','4S','professor','librarian','admission_department') NOT NULL,
password VARCHAR(255) NOT NULL,
u_ip VARCHAR(255) NOT NULL,
signup_date DATETIME NOT NULL,
last_login DATETIME NOT NULL,
act_code VARCHAR(255) NOT NULL,
activation enum('1','0') NOT NULL DEFAULT '0',
PRIMARY KEY (user_info_id),
UNIQUE KEY (u_email,u_mobile)
)
This is my event table:
CREATE TABLE IF NOT EXISTS Event(
Event_id INT(11) NOT NULL AUTO_INCREMENT,
Event_Name VARCHAR(255) NOT NULL,
Event_location VARCHAR(255) NOT NULL,
Event_Organizer VARCHAR(255) NOT NULL,
Event_Date_Posted DATETIME NOT NULL,
Event_Starting_timings DATETIME NOT NULL,
Event_Ending_timings DATETIME NOT NULL,
Event_Day VARCHAR(255) NOT NULL,
Event_Description text NOT NULL,
Event_file_name VARCHAR(255) NOT NULL,
Event_file_path VARCHAR(255) NOT NULL,
Event_file_size VARCHAR(255) NOT NULL,
user_info_id INT(11) NOT NULL,
notification_shown ENUM('1','0') NOT NULL DEFAULT '0',
PRIMARY KEY (Event_id),
FOREIGN KEY (user_info_id) REFERENCES user_info(user_info_id)
)
This is my notification table:
CREATE TABLE IF NOT EXISTS Notifications(
Notifications_id INT(11) NOT NULL AUTO_INCREMENT,
Notification_Type VARCHAR(255) NOT NULL,
Notification_Content VARCHAR(255) NOT NULL,
Notification_Created_Date DATETIME NOT NULL,
Notification_State ENUM('read','unread') NOT NULL DEFAULT 'unread',
Is_Notification_Delete ENUM('1','0') NOT NULL DEFAULT '0',
Notification_Deleted_Date DATETIME NOT NULL,
Sender_id INT(11) NOT NULL,
STATE ENUM('1','0') NOT NULL DEFAULT '0',
Recipient_id INT(11) NOT NULL,
PRIMARY KEY (Notifications_id)
)
You overwrite your $con variable with this line:
$con=mysqli_fetch_assoc($query);
Before that line your $con variable was a valid MySQLi connection handle. After that line it is not an array. Therefore your mysqli_query() call complain that the first argument isn't a mysqli connection/object/handle anymore, but instead is now an array (which it shouldn't).
Change your $con=mysqli_fetch_assoc($query); so it doesn't overwrite your $con variable with the MySQLi connection/object/handle, but instead write the result in a different variable (maybe $userinfo?).
Check if your $con it's been created with properly method mysqli_connect('').
Error
Could not successfully run query (SELECT * FROM prior_approval WHERE id = \'187\') from DB:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '\'187\'' at line 2
PHP code:
$sql9 = "UPDATE prior_approval SET approved = 1, rejected = 0 WHERE id= '" . mysql_real_escape_string($app_id) . "'";
$result9 = mysql_query($sql9) or die(mysql_error());
The test MySQL version is 5.6 and the live version is 5.1. An error message on the ISP's control panel says that the mysql version should be updated.
I have used mysqli as well but that failed so I reverted to mysql
using mysqli code:
$app_id = $_SESSION['app_id'];
$conn = mysqli_connect('localhost',$username,$password,$database);
$sql9 = "UPDATE prior_approval SET approved = 1, rejected = 0 WHERE id= (?)";
$stmt = $conn->prepare($sql9);
$stmt->bind_param('i',$app_id);
$result9 = $stmt->execute();
Resulting error:
Could not successfully run query (SELECT * FROM prior_approval WHERE id = \'187\') from DB: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '\'187\'' at line 2
New error including vardump:
string(7) "\'187\'"
Could not successfully run query (SELECT * FROM prior_approval WHERE id = \'187\') from DB: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '\'187\'' at line 2
Table create:
CREATE TABLE IF NOT EXISTS `prior_approval` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`approv_id` int(6) DEFAULT NULL,
`dist_code` varchar(30) DEFAULT NULL,
`dealer_code` varchar(30) DEFAULT NULL,
`reporter` varchar(50) DEFAULT NULL,
`report_date` date DEFAULT NULL,
`job_kind` int(1) DEFAULT NULL,
`attach` int(1) DEFAULT NULL,
`reply` tinyint(1) DEFAULT NULL,
`engine_oil` int(1) DEFAULT NULL,
`nature_code` varchar(50) DEFAULT NULL,
`model` varchar(10) DEFAULT NULL,
`causal_code` varchar(50) DEFAULT NULL,
`part_code` varchar(20) DEFAULT NULL,
`part_descr` varchar(20) DEFAULT NULL,
`op_code` varchar(20) DEFAULT NULL,
`subject` varchar(50) DEFAULT NULL,
`reg_no_1` varchar(20) DEFAULT NULL,
`vin_1` varchar(17) DEFAULT NULL,
`engine_1` varchar(10) DEFAULT NULL,
`reg_date_1` date DEFAULT NULL,
`km_reading_1` varchar(10) DEFAULT NULL,
`repair_date_1` date DEFAULT NULL,
`repl_no_1` varchar(20) DEFAULT NULL,
`complaint_nature` varchar(1000) DEFAULT NULL,
`sub_repair` varchar(1000) DEFAULT NULL,
`corr_action` varchar(1000) DEFAULT NULL,
`act_result` varchar(1000) DEFAULT NULL,
`recommend` varchar(1000) DEFAULT NULL,
`compl_period` varchar(10) NOT NULL,
`compl_number` int(11) NOT NULL,
`compl_freq` int(11) NOT NULL,
`while_stopped` tinyint(1) NOT NULL,
`during_braking` tinyint(1) DEFAULT NULL,
`during_acc_coast` tinyint(1) DEFAULT NULL,
`during_forward_rev` tinyint(1) DEFAULT NULL,
`during_turn` tinyint(1) DEFAULT NULL,
`turn_speed` int(11) DEFAULT NULL,
`during_rough` tinyint(1) DEFAULT NULL,
`rough_gear` varchar(10) DEFAULT NULL,
`during_decl_incr` tinyint(1) DEFAULT NULL,
`during_any_speed` tinyint(1) DEFAULT NULL,
`during_decel_coast` tinyint(1) DEFAULT NULL,
`using_brake` tinyint(1) DEFAULT NULL,
`using_ac` tinyint(1) DEFAULT NULL,
`using_defog` tinyint(1) DEFAULT NULL,
`using_steer` tinyint(1) DEFAULT NULL,
`using_wwash` tinyint(1) DEFAULT NULL,
`using_starter` tinyint(1) DEFAULT NULL,
`using_clutch` tinyint(1) DEFAULT NULL,
`using_radio` tinyint(1) DEFAULT NULL,
`using_other` tinyint(1) DEFAULT NULL,
`engine_idle` tinyint(1) DEFAULT NULL,
`engine_hot` tinyint(1) DEFAULT NULL,
`engine_start` tinyint(1) DEFAULT NULL,
`engine_cold` tinyint(1) DEFAULT NULL,
`engine_warm_up` tinyint(1) DEFAULT NULL,
`vary_car_speed` tinyint(1) DEFAULT NULL,
`vary_engine_speed` tinyint(1) DEFAULT NULL,
`vary_load` tinyint(1) DEFAULT NULL,
`vary_trunk_load` tinyint(1) DEFAULT NULL,
`how_always` tinyint(1) DEFAULT NULL,
`how_after` tinyint(1) DEFAULT NULL,
`after_speed` int(11) DEFAULT NULL,
`attach1` varchar(100) DEFAULT NULL,
`attach2` varchar(100) DEFAULT NULL,
`attach3` varchar(100) DEFAULT NULL,
`date_created` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`date_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`approved` tinyint(1) NOT NULL,
`rejected` tinyint(1) DEFAULT NULL,
`rejected_reason` text,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=186 ;
I had to convert the $app_id string to integer like this:
//$app_id = $_SESSION['app_id'];
$remove[] = "'";
$remove[] = "\\";
$app_id = (int)str_replace($remove,"", $_SESSION['app_id']);
The later version of MySQL seems to convert automatically.
CREATE DATABASE vehicle_system;
USE vehicle_system;
USE vehicle_system; CREATE TABLE IF NOT EXISTS `users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(250) DEFAULT NULL,
`email` varchar(255) NOT NULL,
`password_hash` text NOT NULL,
`api_key` varchar(32) NOT NULL,
`phone` varchar(14) NOT NULL,
`status` int(1) NOT NULL DEFAULT '1',
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` timestamp NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `email` (`email`),
UNIQUE KEY `phone` (`phone`)
);
CREATE TABLE IF NOT EXISTS `vehicle_model` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(250) DEFAULT NULL,
`manufacturer_id` int(11) NOT NULL,
`manufacturer_name` varchar(250) NOT NULL,
`model` varchar(32) NOT NULL,
`model_no` varchar(32) NOT NULL,
`type` varchar(32) NOT NULL,
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` timestamp NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `manufacturer_id` (`manufacturer_id`)
);
CREATE TABLE IF NOT EXISTS `user_vehicles` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(250) DEFAULT NULL,
`user_id` int(11) NOT NULL,
`manufacturer_id` int(11) NOT NULL,
`vehicle_no` varchar(32) NOT NULL,
`rc_no` text,
`engine_type` varchar(32),
`year` int(4),
`insurance_exp_date` timestamp,
`pollution_exp_date` timestamp,
`rc_renew_date` timestamp,
`insurance_company` varchar(32),
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` timestamp NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `vehicle_no` (`vehicle_no`),
KEY `user_id` (`user_id`),
KEY `manufacturer_id` (`manufacturer_id`)
);
While executing above query I get
#1293 - Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause
But I do not see two default time stamp in the query, Can any one point out what could be the possible error. Is it because current time stamp is present in the users table ? If so how to get rid of this ?
I think the problem is that you do not have a default for all the fields of type timestamp.
Running your query I got the following error:
Error Code: 1067. Invalid default value for 'updated_at'
Then I got:
Error Code: 1067. Invalid default value for 'pollution_exp_date'
Everything works fine when all the timestamp field have a default value:
CREATE DATABASE vehicle_system;
USE vehicle_system;
USE vehicle_system; CREATE TABLE IF NOT EXISTS `users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(250) DEFAULT NULL,
`email` varchar(255) NOT NULL,
`password_hash` text NOT NULL,
`api_key` varchar(32) NOT NULL,
`phone` varchar(14) NOT NULL,
`status` int(1) NOT NULL DEFAULT '1',
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `email` (`email`),
UNIQUE KEY `phone` (`phone`)
);
CREATE TABLE IF NOT EXISTS `vehicle_model` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(250) DEFAULT NULL,
`manufacturer_id` int(11) NOT NULL,
`manufacturer_name` varchar(250) NOT NULL,
`model` varchar(32) NOT NULL,
`model_no` varchar(32) NOT NULL,
`type` varchar(32) NOT NULL,
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `manufacturer_id` (`manufacturer_id`)
);
CREATE TABLE IF NOT EXISTS `user_vehicles` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(250) DEFAULT NULL,
`user_id` int(11) NOT NULL,
`manufacturer_id` int(11) NOT NULL,
`vehicle_no` varchar(32) NOT NULL,
`rc_no` text,
`engine_type` varchar(32),
`year` int(4),
`insurance_exp_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`pollution_exp_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`rc_renew_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`insurance_company` varchar(32),
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `vehicle_no` (`vehicle_no`),
KEY `user_id` (`user_id`),
KEY `manufacturer_id` (`manufacturer_id`)
);
This is on MySql 5.7.10.
There is an interesting discussion on this here:
https://bugs.mysql.com/bug.php?id=41137
Creation of timestamp fields is different from any other!
Practically up to 5.6.6 you do not have to declare NOT NULL as by definition that field is NOT NULL and with neither DEFAULT nor ON UPDATE clauses, it is the same as DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP.
After 5.6.6 you have to explicit defaults. Look also:
https://dev.mysql.com/doc/refman/5.5/en/timestamp-initialization.html
and
http://dev.mysql.com/doc/refman/5.7/en/timestamp-initialization.html
Finally, in your case removing NOT NULL is the best approach.
Regards
I have been having this reoccurring problem when attempting to import a .sql file into MySQL, Here is what I get
ERROR
SQL Query:
CREATE TABLE `ADMINS` (
`id` int(11) NOT NULL auto_increment,
`client_id` varchar(80) NOT NULL default '',
`client_pw` varchar(16) default NULL,
`client_school` varchar(16) default NULL,
`client_expdate` date default '0000-00-00',
`client_fullname` varchar(50) default NULL,
`webinfo` mediumtext,
`webinfodate` date default NULL,
`LastUpdate` timestamp(14) NOT NULL,
`user_activation_key` varchar(60) default NULL,
`user_email` varchar(100) NOT NULL default '',
PRIMARY KEY (`id`)
) TYPE=MyISAM AUTO_INCREMENT=2 ;
MySQL Said:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(14) NOT NULL,
`user_activation_key` varchar(60) default NULL,
`user_email' at line 10
Timestamps don't have lengths. Change:
timestamp(14)
to
timestamp
The syntax is not correct, as pointed by John you do not need to the length for timestamp datatype. In addition type=myisam is deprecated and its engine=myisam now.
CREATE TABLE `ADMINS` (
`id` int(11) NOT NULL auto_increment,
`client_id` varchar(80) NOT NULL default '',
`client_pw` varchar(16) default NULL,
`client_school` varchar(16) default NULL,
`client_expdate` date default '0000-00-00',
`client_fullname` varchar(50) default NULL,
`webinfo` mediumtext,
`webinfodate` date default NULL,
`LastUpdate` timestamp NOT NULL,
`user_activation_key` varchar(60) default NULL,
`user_email` varchar(100) NOT NULL default '',
PRIMARY KEY (`id`)
) engine=MyISAM AUTO_INCREMENT=2 ;