This is a discussion on osCMax-2.0RC2-update051112 1064 Error. within the osCMax v2 Customization/Mods forums, part of the osCMax v2.0 Forums category; The code line below when applied from osCMax-2.0RC2-update051112 patch causes 1064 SQL error when you try to "copy to" duplicate ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| |||
| |||
| The code line below when applied from osCMax-2.0RC2-update051112 patch causes 1064 SQL error when you try to "copy to" duplicate in the catagory products page. If you omit it no problem occurs. Code: // LINE CHANGED: MS2 update 501112 - Added :(empty($product['products_date_available']) ? "null" : ...{some code}... ") . "
// LINE MODED: Added "products_ship_price"
tep_db_query("insert into " . TABLE_PRODUCTS . " (products_quantity, products_model, products_ship_price, products_image, products_price, products_date_added, products_date_available, products_weight, products_status, products_tax_class_id, manufacturers_id) values ('" . tep_db_input($product['products_quantity']) . "', '" . tep_db_input($product['products_model']) . "', '" . $product['products_ship_price'] . "', '" . tep_db_input($product['products_image']) . "', '" . tep_db_input($product['products_price']) . "', now(), " . (empty($product['products_date_available']) ? "null" : "'" . tep_db_input($product['products_date_available']) . "'") . ". '" . tep_db_input($product['products_weight']) . "', '0', '" . (int)$product['products_tax_class_id'] . "', '" . (int)$product['manufacturers_id'] . "')");
$dup_products_id = tep_db_insert_id();
|
| Sponsored Links | ||
| ||
| |
|
#2
| ||||
| ||||
| There was a syntax error. Changing the query to the following (line 36 Code: tep_db_query("insert into " . TABLE_PRODUCTS . " (products_quantity, products_model, products_ship_price, products_image, products_price, products_date_added, products_date_available, products_weight, products_status, products_tax_class_id, manufacturers_id) values ('" . tep_db_input($product['products_quantity']) . "', '" . tep_db_input($product['products_model']) . "', '" . $product['products_ship_price'] . "', '" . tep_db_input($product['products_image']) . "', '" . tep_db_input($product['products_price']) . "', now(), " . (empty($product['products_date_available']) ? "null" : "'" . tep_db_input($product['products_date_available']) . "'") . ", '" . tep_db_input($product['products_weight']) . "', '0', '" . (int)$product['products_tax_class_id'] . "', '" . (int)$product['manufacturers_id'] . "')");
__________________ Michael Sasek osCMax Developer
|
|
#3
| |||
| |||
| Original Quote:
New Quote:
Quote:
|
|
#4
| ||||
| ||||
| Use the code I posted as a fix. It corrects the issue.
__________________ Michael Sasek osCMax Developer
|
| Sponsored Links | ||
| ||
| |
| Thread Tools | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Fatal error after intalling osCMax-2.0RC2-update051112 patch | ikhan42 | osCMax v2 Installation issues | 1 | 06-10-2006 10:17 AM |
| Is this the full program - osCMax-2.0RC2-update051112 p | ozstar | osCMax v2 Installation issues | 1 | 02-08-2006 10:39 AM |
| 2 osCMax-2.0RC2 issues | macfionn | osCMax v2 Features Discussion | 7 | 01-02-2006 09:43 PM |
| Security Patch osCMax 2.0RC2 | warrenthewindmill | osCMax v1.7 Discussion | 2 | 12-04-2005 10:50 AM |
| osCMax 2.0RC2 Security Patch/Update 051112 | michael_s | osCMax v2 Announcements | 0 | 11-27-2005 10:12 AM |