Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

1064 - Mysql error when trying to copy products in admin


acer88

Recommended Posts

Posted

I get this error in thecategories.php file when trying to copy products.

 

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 '1', '0', 'UC8B-ML', 'UT1', '0', '4', '3', '', '0', '3', '5.7500'

 

insert into products (products_quantity, products_model, subtitle, products_image, products_price, products_price1, products_price2, products_price3, products_price4, products_price5, products_price6, products_price7, products_price8, products_price1_qty, products_price2_qty, products_price3_qty, products_price4_qty, products_price5_qty, products_price6_qty, products_price7_qty, products_price8_qty, products_qty_blocks, products_date_added, products_date_available, products_weight, gender, product_line, inhouse_id, manufacturer_size_chart, products_status, products_tax_class_id, manufacturers_id, products_master, products_master_status, vendors_prod_id, vendors_product_price, vendors_prod_comments, vendors_id) values ('-20', '0400', 'Solid White Long Sleeve', 'uc8b.jpg', '5.7500','13.9500','10.9500','8.9500','0.0000','0.0000','0.0000','0.0000','0.0000','1','12','24','0','0','0','0','0', now(),'', '1.50, '1', '0', 'UC8B-ML', 'UT1', '0', '4', '3', '', '0', '3', '5.7500','', '4')

 

[TEP STOP]

 

 

the categories.php file looks like this where it insert the data into the products table

 

tep_db_query("insert into " . TABLE_PRODUCTS . " (products_quantity, products_model, subtitle, products_image, products_price, products_price1, products_price2, products_price3, products_price4, products_price5, products_price6, products_price7, products_price8, products_price1_qty, products_price2_qty, products_price3_qty, products_price4_qty, products_price5_qty, products_price6_qty, products_price7_qty, products_price8_qty, products_qty_blocks, products_date_added, products_date_available, products_weight, gender, product_line, inhouse_id, manufacturer_size_chart, products_status, products_tax_class_id, manufacturers_id, products_master, products_master_status, vendors_prod_id, vendors_product_price, vendors_prod_comments, vendors_id) values ('" . tep_db_input($product['products_quantity']) . "', '" . tep_db_input($product['products_model']) . "', '" . tep_db_input($product['subtitle']) . "', '" . tep_db_input($product['products_image']) . "', '" . tep_db_input($product['products_price']) . "',"

. "'". tep_db_input($product['products_price1']) . "'," .

"'". tep_db_input($product['products_price2']) . "'," .

"'". tep_db_input($product['products_price3']) . "'," .

"'". tep_db_input($product['products_price4']) . "'," .

"'". tep_db_input($product['products_price5']) . "'," .

"'". tep_db_input($product['products_price6']) . "'," .

"'". tep_db_input($product['products_price7']) . "'," .

"'". tep_db_input($product['products_price8']) . "'," .

 

"'". tep_db_input($product['products_price1_qty']) . "'," .

"'". tep_db_input($product['products_price2_qty']) . "'," .

"'". tep_db_input($product['products_price3_qty']) . "'," .

"'". tep_db_input($product['products_price4_qty']) . "'," .

"'". tep_db_input($product['products_price5_qty']) . "'," .

"'". tep_db_input($product['products_price6_qty']) . "'," .

"'". tep_db_input($product['products_price7_qty']) . "'," .

"'". tep_db_input($product['products_price8_qty']) . "',"

 

 

I am not a expert php coder but am holding my own, maybe some of you guys that are seasoned php coders can spot the mistake? thanks for any help

Posted
I get this error in thecategories.php file when trying to copy products.

the categories.php file looks like this where it insert the data into the products table

 

 

I am not a expert php coder but am holding my own, maybe some of you guys that are seasoned php coders can spot the mistake? thanks for any help

 

The value of :

1.50

is missing a single quote after it :

 

values ('-20', '0400', 'Solid White Long Sleeve', 'uc8b.jpg', '5.7500','13.9500','10.9500','8.9500','0.0000','0.0000','0.0000','0.0000','0.0000','1','12','24','0','0','0','0','0', now(),'', '1.50, '1', '0', 'UC8B-ML', 'UT1', '0', '4', '3', '', '0', '3', '5.7500','', '4')

 

Corrina

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...