I have added additional fields to my product description pages. When I update the product i get the following message:
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 'usage =
I have run an error check and it gives me this:
PHP Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in /home/irrigat2/public_html/tomatopedia.com/admin/includes/modules/product/collect_info.php on line 60
Here is the code:
The area highlighted in red is where the alleged error is.
The blue highlighted text is what I have added.
I used the following thread to achieve do this:
http://www.zen-cart.com/forum/showth...roduct+details
'products_sort_order' => '0',
'products_discount_type' => '0',
'products_discount_type_from' => '0',
'products_price_sorter' => '0',
'master_categories_id' => '0',
'colour' => '0',
'sun_exposure'=> '0',
'fruit_weight'=> '0',
'resistance'=> '0',
'shape' => '0',
'habitat' => '0',
'growing_conditions' => '0',
'maturity' => '0',
'usage' => '0',
'seed' => '0',
'plant_height' => '0',
'plant_spacing' => '0',
'a_k_a' => '0',
'history_description' => '0',
'fruit_description' => '0',
'plant_description' => '0',
'family' => '0',
'genus' => '0',
'species' => '0'
);
$pInfo = new objectInfo($parameters);
if (isset($_GET['pID']) && empty($_POST)) {
$product = $db->Execute("select pd.products_name, pd.products_description, pd.products_url,
p.products_id, p.products_quantity, p.products_model,
p.products_image, p.products_price, p.products_virtual, p.products_weight,
p.products_date_added, p.products_last_modified,
date_format(p.products_date_available, '%Y-%m-%d') as
products_date_available, p.products_status, p.products_tax_class_id,
p.manufacturers_id,
p.products_quantity_order_min, p.products_quantity_order_units, p.products_priced_by_attribute,
p.product_is_free, p.product_is_call, p.products_quantity_mixed,
p.product_is_always_free_shipping, p.products_qty_box_status, p.products_quantity_order_max,
p.products_sort_order,
p.products_discount_type, p.products_discount_type_from,
p.products_price_sorter, p.master_categories_id,
p.colour, p.sun_exposure, p.fruit_weight, p.resistance, p.shape, p.habitat, p.growing_conditions, p.maturity, p.usage, p.seed, p.plant_height, p.plant_spacing, p.a_k_a, p.history_description, p.fruit_description, p.plant_description, p.family, p.genus, p.species
from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd
where p.products_id = '" . (int)$_GET['pID'] . "'
and p.products_id = pd.products_id
and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'");




