Jump to content

CREATE TABLE issues


Nim199

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...