Ruth Posted August 17, 2010 Share Posted August 17, 2010 I'm using mysql 5.1 I have four tables, I'm trying to use the fifth to link them together. I have a client, agency, phone log, and employers table that is created. I'm getting the following error when I try to create my link table placement: ERROR 1005 (HY000): Can't create table './netpro/placement.frm' (errno: 150) Here is my create table statement: create table placement ( pclient_id int, pagent_id char(20), plog int, pemp_id int, start_date date, pay int, constraint pk_placement primary key (pclient_id, pagent_id, plog, pemp_id), constraint fk_pclient foreign key (pclient_id) references client on update cascade on delete cascade, constraint fk_pagent foreign key (pagent_id) references agency on update cascade on delete cascade, constraint fk_plog foreign key (plog) references phone_log on update cascade on delete cascade, constraint fk_pempid foreign key (pemp_id) references employers on update cascade on delete cascade ) engine = innodb; Quote Link to comment https://forums.phpfreaks.com/topic/210982-create-table-error/ Share on other sites More sharing options...
Ruth Posted August 17, 2010 Author Share Posted August 17, 2010 I took out the constraint pk_placement. I changed the data type for pay to money. Now I'm getting the following error: ERROR 1064 (42000): 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 ' start_date datetime, pay money, primary key (pclient_id, pagent_id, plog, pemp_' at line 5 As far as I can see the date data type is correct I'm not sure about money. But it still throws the error regardless. Quote Link to comment https://forums.phpfreaks.com/topic/210982-create-table-error/#findComment-1100426 Share on other sites More sharing options...
fenway Posted August 18, 2010 Share Posted August 18, 2010 Let's see the new create command. Quote Link to comment https://forums.phpfreaks.com/topic/210982-create-table-error/#findComment-1100985 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.