Importing a db table structure into a database using PHP MyAdmin the following table will not import. i can find no errors on the table, perhaps i am missing something.

-- --------------------------------------------------------

--

-- Table structure for table conversations

CREATE TABLE conversations (
cid varchar(25) NOT NULL default '',
uid varchar(25) NOT NULL default '',
msgstartdt timestamp(14) NOT NULL,
msgdttime timestamp(14) NOT NULL,
msgtext blob NOT NULL
) ENGINE=MYISAM;

-- --------------------------------------------------------

Error

SQL query:

-- --------------------------------------------------------
-- 
-- Table structure for table `conversations`
-- 
CREATE TABLE `conversations` (
`cid` varchar( 25 ) NOT NULL default '',
`uid` varchar( 25 ) NOT NULL default '',
`msgstartdt` timestamp( 14 ) NOT NULL ,
`msgdttime` timestamp( 14 ) NOT NULL ,
`msgtext` blob NOT NULL ,
) ENGINE = MYISAM ;

MySQL said: Documentation
#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,
  `msgdttime` timestamp(14) NOT NULL,
  `msgtext` blob NOT NULL' at line 10 

I don't think you have to specify a field size for timestamp type columns. This appears to be where the error message is orriginating, so I would try removing it so those fields read simply as:

`msgstartdt` timestamp NOT NULL ,
`msgdttime` timestamp NOT NULL ,

On a side note, I'm not sure how you are intending to use those fields, but you may want to check the manual on date & time data types

Typically, timestamp is used to auto-generate the current time (in unix timestamp format) when the record is updated. If you want to store specific values, you may be better served to use the datetime type.

Just a thought.

Many thanks Hearth! That has certainly resolved the issue.
I am a pensioner and a database amateur and i have been playing around with an old script which is no longer supported and is defunct.

I can now move onto the usual "Warning: include(/home/mysite/public_html/init.php) [function.include]: failed to open stream:"
Again Thanks! i am very grateful.

Oh dear!
I have spent the last 6 weeks playing around with this script and resolving all the bugs, connection problems etc. only to get it finally working and then receive the message...

Restriction of demo version.
You can not use this feature. This is restriction of demo version.

Guess i shall just have to keep looking for a suitable replacement!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.