
Originally Posted by
Nightfly66
Zen Cart v1.5.4 (PHP Version: 5.6.17 - MySQL 5.6.29)
Localization -> Languages: Italian/English
Easy Populate 4.0.33a - Beta 02-29-2016
Model/Price/Qty (with Specials)
I export two "v_products_model" and two "v_products_name"
I correct the stocks ("v_products_quantity" and "v_status"
I import the file and i see: "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"
Debug Log: "MySQLi error 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 'WHERE products_id = *** AND language_id = 3' at line 1
When executing: UPDATE products_description SET WHERE products_id = *** AND language_id = 3"
*** They are different ID
Why ? Any suggestions ?
Regards
Almost on second thought, how complete is the above SQL as compared to what was logged?
Code:
UPDATE products_description SET WHERE products_id = *** AND language_id = 3
Other than the products_id being removed, was there anything else that was removed?
If the answer is no, then the solution is in modifying lines 2006-2009 from:
Code:
$result = ep_4_query($sql);
if ($result) {
zen_record_admin_activity('Updated product ' . (int) $v_products_id . ' description via EP4.', 'info');
}
to:
Code:
if ($update_count == true) {
$result = ep_4_query($sql);
if ($result) {
zen_record_admin_activity('Updated product ' . (int) $v_products_id . ' description via EP4.', 'info');
}
}
The reason for that "issue" is that in permitting the omission of the four fields associated with this section, the omission of all data in that section will result in a query that does not do anything. Because of the multi-language aspect, it is not "easy" to test for the need to run any of the insert/update in this section in advance to have the effort duplicated again within the section. But, if there is no data to be updated, then the query should not be executed. This should be accomplished by the above code change which will skip the update if there is nothing to be updated that relates to that section of the code...
Bookmarks