travisb Posted February 4, 2004 Share Posted February 4, 2004 I am moving our catalog database, named helten, from the test server to the production server. Using phpmyadmin, I exported the database with "drop table" and "complete inserts" options. On the production server I tried to import the database using phpmyadmin. I got an error and I am not sure what is causing it. Here is the error MySQL said: You have an error in your SQL syntax near '01.062', NULL, '2970.0000', '2004-01-21 10:07:33', '2004-01-23 09:58:39', NULL, ' at line 1 Here are the few lines around the error INSERT INTO `products` (`products_id`, `products_quantity`, `products_model`, `products_image`, `products_price`, `products_date_added`, `products_last_modified`, `products_date_available`, `products_weight`, `products_status`, `products_tax_class_id`, `manufacturers_id`, `products_ordered`, `products_mediumimage`, `products_largeimage`, `products_dim`, `products_ship`, `products_ship_method`, `products_ship_price`) VALUES (462, 1, '01.062', NULL, '2970.0000', '2004-01-21 10:07:33', '2004-01-23 09:58:39', NULL, '250.00', 1, 1, 13, 0, '', '', 'Width: 79" with armrests upright<br>Width #2: 109" with armrests folded down<br>Depth: 31"<br>Height: 28"<br>Seating Height: 16"', 3, '', '325.0000'); INSERT INTO `products` (`products_id`, `products_quantity`, `products_model`, `products_image`, `products_price`, `products_date_added`, `products_last_modified`, `products_date_available`, `products_weight`, `products_status`, `products_tax_class_id`, `manufacturers_id`, `products_ordered`, `products_mediumimage`, `products_largeimage`, `products_dim`, `products_ship`, `products_ship_method`, `products_ship_price`) VALUES (463, 1, '01.061', NULL, '2970.0000', '2004-01-21 10:07:49', '2004-01-23 09:59:03', NULL, '250.00', 1, 1, 13, 0, '', '', 'Width: 79" with armrests upright<br>Width #2: 109" with armrests folded down<br>Depth: 31"<br>Height: 28"<br>Seating Height: 16"', 3, '', '325.0000'); INSERT INTO `products` (`products_id`, `products_quantity`, `products_model`, `products_image`, `products_price`, `products_date_added`, `products_last_modified`, `products_date_available`, `products_weight`, `products_status`, `products_tax_class_id`, `manufacturers_id`, `products_ordered`, `products_mediumimage`, `products_largeimage`, `products_dim`, `products_ship`, `products_ship_method`, `products_ship_price`) VALUES (464, 1, '01.010', NULL, '2201.0000', '2004-01-21 10:21:17', '2004-01-23 10:02:11', NULL, '127.00', 1, 1, 13, 0, '', '', 'Width: 2\' 2 3/4"<br>Depth: 2\' 6 7/10"<br>Height: 2 2 1/3"<br>Seating height: 1\' 4 1/2"', 3, '', '165.1000'); Here is a link to the sql for the products table ( search for 01.062 for the line) http://65.18.218.28/sql.txt Link to comment Share on other sites More sharing options...
Guest Posted February 4, 2004 Share Posted February 4, 2004 I had this problem before and don't remember what I eventually did to fix it. I do, however, remember two workarounds that I used (and that worked) at first: 1) backup the database with the osCommerce tool first (Admin, Tools, Backup), then "restore" it on the new osCommerce install 2) use a text editor to divide up the .txt file into smaller chunks, and import those one at time It may not be a syntax problem at all . . . -jared Link to comment Share on other sites More sharing options...
travisb Posted February 4, 2004 Author Share Posted February 4, 2004 Thanks, jared, but I came up with a solution a little while ago. First I removed the entire products table sql. Then I used phpmyadmin to create the other tables by importing the sql. Then I tried the products sql. It still did not work. I commented out the line that was causing the error and tried again. It worked. Then I only had the one product left. I could not see anything wrong with it. I pasted the line into the phpmyadmin query field and it added the row fine. I have no idea what is wrong with that line. It is all working fine now. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.