help!help!php mysql code?

I have a table patient and i have to relate the table patient and table press and doctor .I am using apache2triad and this error display when i try to create table pres

CREATE TABLE `pres` (

`pres_id` SMALLINT(5) NOT NULL AUTO_INCREMENT,

`issuedate` VARCHAR(50) NOT NULL,

`prescriber` VARCHAR(50) NOT NULL,

`sickness` VARCHAR(50) NOT NULL,

`drugname` VARCHAR(50) NOT NULL,

`dose` VARCHAR(50) NOT NULL,

`dosageform` VARCHAR(50) NOT NULL,

`dosageamount` VARCHAR(50) NOT NULL,

`directionofuse` VARCHAR(50) NOT NULL,

`refillinstruction` VARCHAR(50) NOT NULL,

`anycomment` VARCHAR(50) NOT NULL,

PRIMARY KEY (`pres_id`),FOREIGN KEY ('pat_id') REFERENCES patient, FOREIGN KEY('doct1_id') REFERENCES doctor

)

TYPE = 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 ''Pat_id'),FOREIGN KEY ('Pat_id') REFERENCES patient(id)

ON DEL

Please enter comments
Please enter your name.
Please enter the correct email address.
You must agree before submitting.

Answers & Comments


Helpful Social

Copyright © 2024 Q2A.ES - All rights reserved.