Topic awaiting preservation: MySQL Foreign_key_checks Error message (Page 1 of 1) |
|
---|---|
Bipolar (III) Inmate From: |
posted 12-15-2009 18:33
Please help i thank you in advace code: USE database_name; SET FOREIGN_KEY_CHECKS=0; DROP TABLE IF EXISTS comments; CREATE TABLE comments ( id int(11) unsigned NOT NULL auto_increment, photograph_id int(11) unsigned NOT NULL, created datetime NOT NULL, author varchar(255) NOT NULL, body text NOT NULL, PRIMARY KEY (id), INDEX (photograph_id), FOREIGN KEY (photograph_id) REFERENCES photographs(id) ) ENGINE=InnoDB; SET FOREIGN_KEY_CHECKS = 1;
|
Maniac (V) Mad Scientist with Finglongers From: Germany |
posted 12-16-2009 09:20
how are you calling this script? |
Bipolar (III) Inmate From: |
posted 12-16-2009 12:23
I use aqua data studio to call the script and create the database |
Maniac (V) Mad Scientist with Finglongers From: Germany |
posted 12-16-2009 15:27
So I'd start separating it into the actual calls, see which one is the culprit - perhaps your aqua data studio only takes one statement per call? |
Bipolar (III) Inmate From: |
posted 12-17-2009 05:33
No thats not it it worked fine when i had windows. Now that i have bought a new mac it seems not to be working. all i did was use the same scripts saved from windows |
Bipolar (III) Inmate From: |
posted 12-17-2009 05:39
Never mind Tyberius Prime i figured it out. the program wasn't set to use the ";" as the statement delimited so i changed it in the preferences and it worked just fine |