homepage Welcome to WebmasterWorld Guest from 54.167.138.53
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / Databases
Forum Library, Charter, Moderator: open

Databases Forum

    
Success in database CONNECTION.
Scotty13




msg:4451560
 10:53 pm on May 9, 2012 (gmt 0)

Trying to get my main table to connect. Keeping getting the same error…

Success in database CONNECTION.....
no TABLE created. You have problems in the system already, backtrack and debug!

My table in my script/ Dreamweaver CS 4 matches exactly to entries I have in phpMyAdmin.

What ‘am I missing here?

<?php
require_once "connect_to_mysql.php";
// Tell ourselves on screen if we have connected
print "Success in database CONNECTION.....<br />";
// Create the members main table in your new database
$result = "CREATE TABLE myMembers (
id int(11) NOT NULL auto_increment,
uid int(11) NOT NULL,
username varchar(255) NOT NULL,
firstname varchar(255) NOT NULL
lastname varchar(255) NOT NULL,
maidenname varchar(255) NULL,
city varchar(255) NOT NULL,
state_province varchar(255) NOT NULL,
country varchar(255) NOT NULL,
workstatus varchar(255) NOT NULL,
seniority date NOT NULL default '0000-00-00'
airline varchar(255) NOT NULL,
currentairline varchar(255) NOT NULL,
previousairline varchar(255) NOT NULL,
myfirstairline varchar(255) NOT NULL,
email varchar(255) NOT NULL,
locator varchar(255) NOT NULL,
made_res_date datetime NOT NULL default '0000-00-00',
last_ckin_date datetime NOT NULL default '0000-00-00',
bio_body text NULL,
website varchar(255) NULL,
ipaddress varchar(255) NOT NULL,
passenger_array text NULL,
ts timestamp NULL default '0000-00-00 00:00:00',
account_type enum('a','b','c') NOT NULL default 'a',
email_activated enum('0','1') NOT NULL default '0',
private enum('0','1') NOT NULL default '0',
PRIMARY KEY (id),
UNIQUE KEY email (email)
) ";
if (mysql_query($result)){
print "Success in TABLE creation!......
<br /><br /><b>That completes the table setup, now delete the file <br />
named 'create_Table.php' and you are ready to move on. Let us go!</b>";
} else {
print "no TABLE created. You have problems in the system already, backtrack and debug!";
}
exit();
?>


Thanks, Scott

 

whoisgregg




msg:4451832
 2:16 pm on May 10, 2012 (gmt 0)

Looks like you are missing a comma at the end of this line:
seniority date NOT NULL default '0000-00-00'

rocknbil




msg:4451872
 3:51 pm on May 10, 2012 (gmt 0)

you can also enhance it with this to get more useful info about why it's in the error trap:

print "no TABLE created. You have problems in the system already, backtrack and debug!" . mysql_error();

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Databases
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved