failing to import an export from phpMyAdmin

failing to import an export from phpMyAdmin

am 30.10.2006 18:33:41 von laredotornado

Hello,

My hosting company has MySQL 5 and so do I on my local Fedora Core 5
Linux machine. However, when I import a dump file from their
enviornment into mine, I get this error

ERROR 1064 (42000) at line 21428: 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 'TABLE `EC_SAVED_ORDER_LINE_ITEMS`
ADD CONSTRAINT `FK1_SAVED_ORDER_LINE_ITEMS` ' at line 3

This is the line (and those around it) from my file. It is complaining
about the first line. What is the problem?

ALTER TABLE `EC_SAVED_ORDER_LINE_ITEMS`
ADD CONSTRAINT `FK1_SAVED_ORDER_LINE_ITEMS` FOREIGN KEY
(`ORDER_FORM_PRINTER_ID`) REFERENCES `ORDER_FORM_PRINTERS`
(`ORDER_FORM_PRINTER_ID`) ON DELETE CASCADE,
ALTER TABLE `EC_SAVED_ORDER_LINE_ITEMS`
ADD CONSTRAINT `FK1_SAVED_ORDER_LINE_ITEMS` FOREIGN KEY
(`ORDER_FORM_PRINTER_ID`) REFERENCES `ORDER_FORM_PRINTERS`
(`ORDER_FORM_PRINTER_ID`) ON DELETE CASCADE, ADD CONSTRAINT
`FK2_SAVED_ORDER_LINE_ITEMS` FOREIGN KEY (`PRODUCT_ID`) REFERENCES
`PROD_PRODUCTS` (`PRODUCT_ID`) ON DELETE CASCADE,
ALTER TABLE `EC_SAVED_ORDER_LINE_ITEMS`
ADD CONSTRAINT `FK1_SAVED_ORDER_LINE_ITEMS` FOREIGN KEY
(`ORDER_FORM_PRINTER_ID`) REFERENCES `ORDER_FORM_PRINTERS`
(`ORDER_FORM_PRINTER_ID`) ON DELETE CASCADE, ADD CONSTRAINT
`FK2_SAVED_ORDER_LINE_ITEMS` FOREIGN KEY (`PRODUCT_ID`) REFERENCES
`PROD_PRODUCTS` (`PRODUCT_ID`) ON DELETE CASCADE, ADD CONSTRAINT
`FK3_SAVED_ORDER_LINE_ITEMS` FOREIGN KEY (`TRANSACTION_ID`) REFERENCES
`EC_SAVED_ORDERS` (`TRANSACTION_ID`) ON DELETE CASCADE;

Thanks, - Dave

Re: failing to import an export from phpMyAdmin

am 30.10.2006 21:32:29 von Jeff North

On 30 Oct 2006 09:33:41 -0800, in mailing.database.mysql
laredotornado@zipmail.com
<1162229621.075985.219390@e3g2000cwe.googlegroups.com> wrote:

>| Hello,
>|
>| My hosting company has MySQL 5 and so do I on my local Fedora Core 5
>| Linux machine. However, when I import a dump file from their
>| enviornment into mine, I get this error
>|
>| ERROR 1064 (42000) at line 21428: 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 'TABLE `EC_SAVED_ORDER_LINE_ITEMS`
>| ADD CONSTRAINT `FK1_SAVED_ORDER_LINE_ITEMS` ' at line 3

The keyword is 'near'.
Have a look at the preceding lines as they're more likely to be
causing the problem.
------------------------------------------------------------ ---
jnorthau@yourpantsyahoo.com.au : Remove your pants to reply
------------------------------------------------------------ ---

Re: failing to import an export from phpMyAdmin

am 31.10.2006 09:39:43 von Davie

Have you created table EC_SAVED_ORDER_LINE_ITEMS ???
laredotornado@zipmail.com wrote:
> Hello,
>
> My hosting company has MySQL 5 and so do I on my local Fedora Core 5
> Linux machine. However, when I import a dump file from their
> enviornment into mine, I get this error
>
> ERROR 1064 (42000) at line 21428: 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 'TABLE `EC_SAVED_ORDER_LINE_ITEMS`
> ADD CONSTRAINT `FK1_SAVED_ORDER_LINE_ITEMS` ' at line 3
>
> This is the line (and those around it) from my file. It is complaining
> about the first line. What is the problem?
>
> ALTER TABLE `EC_SAVED_ORDER_LINE_ITEMS`
> ADD CONSTRAINT `FK1_SAVED_ORDER_LINE_ITEMS` FOREIGN KEY
> (`ORDER_FORM_PRINTER_ID`) REFERENCES `ORDER_FORM_PRINTERS`
> (`ORDER_FORM_PRINTER_ID`) ON DELETE CASCADE,
> ALTER TABLE `EC_SAVED_ORDER_LINE_ITEMS`
> ADD CONSTRAINT `FK1_SAVED_ORDER_LINE_ITEMS` FOREIGN KEY
> (`ORDER_FORM_PRINTER_ID`) REFERENCES `ORDER_FORM_PRINTERS`
> (`ORDER_FORM_PRINTER_ID`) ON DELETE CASCADE, ADD CONSTRAINT
> `FK2_SAVED_ORDER_LINE_ITEMS` FOREIGN KEY (`PRODUCT_ID`) REFERENCES
> `PROD_PRODUCTS` (`PRODUCT_ID`) ON DELETE CASCADE,
> ALTER TABLE `EC_SAVED_ORDER_LINE_ITEMS`
> ADD CONSTRAINT `FK1_SAVED_ORDER_LINE_ITEMS` FOREIGN KEY
> (`ORDER_FORM_PRINTER_ID`) REFERENCES `ORDER_FORM_PRINTERS`
> (`ORDER_FORM_PRINTER_ID`) ON DELETE CASCADE, ADD CONSTRAINT
> `FK2_SAVED_ORDER_LINE_ITEMS` FOREIGN KEY (`PRODUCT_ID`) REFERENCES
> `PROD_PRODUCTS` (`PRODUCT_ID`) ON DELETE CASCADE, ADD CONSTRAINT
> `FK3_SAVED_ORDER_LINE_ITEMS` FOREIGN KEY (`TRANSACTION_ID`) REFERENCES
> `EC_SAVED_ORDERS` (`TRANSACTION_ID`) ON DELETE CASCADE;
>
> Thanks, - Dave

Re: failing to import an export from phpMyAdmin

am 31.10.2006 15:24:18 von larko

also, i'd look at the table being referenced: order_form_printers and
make sure it's pk is set correctly.



davie wrote:
> Have you created table EC_SAVED_ORDER_LINE_ITEMS ???
> laredotornado@zipmail.com wrote:
>> Hello,
>>
>> My hosting company has MySQL 5 and so do I on my local Fedora Core 5
>> Linux machine. However, when I import a dump file from their
>> enviornment into mine, I get this error
>>
>> ERROR 1064 (42000) at line 21428: 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 'TABLE `EC_SAVED_ORDER_LINE_ITEMS`
>> ADD CONSTRAINT `FK1_SAVED_ORDER_LINE_ITEMS` ' at line 3
>>
>> This is the line (and those around it) from my file. It is complaining
>> about the first line. What is the problem?
>>
>> ALTER TABLE `EC_SAVED_ORDER_LINE_ITEMS`
>> ADD CONSTRAINT `FK1_SAVED_ORDER_LINE_ITEMS` FOREIGN KEY
>> (`ORDER_FORM_PRINTER_ID`) REFERENCES `ORDER_FORM_PRINTERS`
>> (`ORDER_FORM_PRINTER_ID`) ON DELETE CASCADE,
>> ALTER TABLE `EC_SAVED_ORDER_LINE_ITEMS`
>> ADD CONSTRAINT `FK1_SAVED_ORDER_LINE_ITEMS` FOREIGN KEY
>> (`ORDER_FORM_PRINTER_ID`) REFERENCES `ORDER_FORM_PRINTERS`
>> (`ORDER_FORM_PRINTER_ID`) ON DELETE CASCADE, ADD CONSTRAINT
>> `FK2_SAVED_ORDER_LINE_ITEMS` FOREIGN KEY (`PRODUCT_ID`) REFERENCES
>> `PROD_PRODUCTS` (`PRODUCT_ID`) ON DELETE CASCADE,
>> ALTER TABLE `EC_SAVED_ORDER_LINE_ITEMS`
>> ADD CONSTRAINT `FK1_SAVED_ORDER_LINE_ITEMS` FOREIGN KEY
>> (`ORDER_FORM_PRINTER_ID`) REFERENCES `ORDER_FORM_PRINTERS`
>> (`ORDER_FORM_PRINTER_ID`) ON DELETE CASCADE, ADD CONSTRAINT
>> `FK2_SAVED_ORDER_LINE_ITEMS` FOREIGN KEY (`PRODUCT_ID`) REFERENCES
>> `PROD_PRODUCTS` (`PRODUCT_ID`) ON DELETE CASCADE, ADD CONSTRAINT
>> `FK3_SAVED_ORDER_LINE_ITEMS` FOREIGN KEY (`TRANSACTION_ID`) REFERENCES
>> `EC_SAVED_ORDERS` (`TRANSACTION_ID`) ON DELETE CASCADE;
>>
>> Thanks, - Dave
>