Hi
I will like to add this below code to my data base but I have a string error that I cant correct be for I put it in my db can you pleas help
I cant find any thing wrong with this line but it tels me that I have a "unexpected T_STRING" error in line 11 that is the line starting with "CREATE TABLE `course` and I sagest if this one line gives me a string error the rest of the lines will give me a error to be cos it all looks the same ore wont that matter
Code:
<?php
CREATE TABLE `course`
(
`cname` varchar(50) NOT NULL default",
`cid` int(6) NOT NULL auto_increment,
PRIMARY KEY (`cid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
CREATE TABLE `course_student`(
`sno` int(6) NOT NULL default '0',
`cid` int(6) NOT NULL default '0',
`year` int(4) NOT NULL default '0'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
CREATE TABLE `student`(
`sno` int(6) NOT NULL auto_increment,
`sname` varchar(40) NOT NULL default",
`init` varchar(5) NOT NULL default",
`fname` varchar(40) NOT NULL default",
`title` varchar(4) NOT NULL default",
`msname` varchar(40) NOT NULL default",
`dob` varchar(8) NOT NULL default",
`sex` char(2) NOT NULL default",
`lang` varchar(10) NOT NULL default",
`idno` varchar(13) NOT NULL default",
`telh` varchar(12) NOT NULL default",
`telw` varchar(12) NOT NULL default",
`cel` varchar(12) NOT NULL default",
`fax` varchar(12) NOT NULL default",
`email` varchar(40) NOT NULL default",
`address` tinytext NOT NULL,
PRIMARY KEY (`sno`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
?>
Thanks