Jump to content

CREATE TABLE issues


Nim199
 Share

Recommended Posts

Hi, I am trying to Create the tables for a Forum.Here is my code, can you please tell me what is wrong with it.

<?php$con = mysql_connect("######","######","######");mysql_select_db("######",$con);$CMembers = "CREATE TABLE members(UserID integer(6),UserName varchar(50),UserPassword varchar(20),Posts integer(6),BirthDate date(yyyymmdd),Statement varchar(200))";mysql_query($CMembers,$con);mysql_close($con);?>

$con is correct, and I have create the database, it exist, and the true name is correct.Note: SHARP (#) signs act as wild card(s). I have put them in for security. The number of '#' does not correspond with the number of charactors.

Link to comment
Share on other sites

I don't think so. I have used 'Integer' before without any problems, but I will try with INT when I can next.

Link to comment
Share on other sites

On MySQL the engine does not accept the yyyymmdd argument for the date field type - there is only one type of "date" in MySQL, in the format YYY-MM-DD. That cannot be changed.There is a list of MySQL field types here - http://www.xnote.com/howto/mysql_field_types.htmlINTEGER is a valid alias of INT.

Link to comment
Share on other sites

No error meassag returned. Just a blank screen.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...