New Zenner
- Join Date:
- Jun 2011
- Location:
- Bournemouth UK
- Posts:
- 44
- Plugin Contributions:
- 0
Easy Populate 1.2.5.4 support
Hi ,
I get this message :
An SQL error has occured. Please check your input data for tabs within fields and delete these. If this error continues, please forward your error log to the Easy Populate maintainer
and I think I know where Ive gone wrong.
Ive added 4 new fields to the database :
products_supplier_code
products_gb_code
products_price_markup
products_priceWS
and tried to reference them all in EasyPopulate.php, but I think I have the following part (the update (insert into or update) part) wrong...would one of you wizards please check for me and Ill magic a pint of beer over for them!...Thanks.
code is: (my additions are in red)
$query = 'UPDATE '.TABLE_PRODUCTS.'
SET
products_price="'.zen_db_input($v_products_price).
'" ,products_image="'.zen_db_input($v_products_image);
// redundant image mods removed
$query .= '", products_weight="'.zen_db_input($v_products_weight) .
'", products_supplier_code"'.zen_db_input($v_products_supplier_code).
'", products_gb_code="'.zen_db_input($v_products_gb_code).
'", products_price_markup="'.zen_db_input($v_products_price_markup).
'", products_priceWS="'.zen_db_input($v_products_priceWS).
'", products_tax_class_id="'.zen_db_input($v_tax_class_id) .
'", products_date_available= ' . $v_date_avail .
', products_date_added= ' . $v_date_added .
', products_last_modified=CURRENT_TIMESTAMP' .
', products_quantity="' . zen_db_input($v_products_quantity) .
'" ,manufacturers_id=' . $v_manufacturer_id .
' , products_status=' . zen_db_input($v_db_status) . '
WHERE
(products_id = "'. $v_products_id . '")';
$result = ep_query($query);
if ($result == true) {
$display_output .= sprintf(EASYPOPULATE_DISPLAY_RESULT_UPDATE_PRODUCT, $v_products_model);
foreach ($items as $col => $langer) {
if ($col == $filelayout['v_products_model']) continue;
$display_output .= print_el($langer);
}
} else {
$display_output .= sprintf(EASYPOPULATE_DISPLAY_RESULT_UPDATE_PRODUCT_FAIL, $v_products_model);
}
}