From: Pak R. <pak...@gm...> - 2014-08-29 06:57:55
|
Hi all: I've got this error when trying to add a non-existing stockid to a work order. *Database Error 1064* : There is a problem selecting the part records to display because 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 '-20' at line 11 *Database SQL Failure* : The SQL used to get the part selection was SELECT stockmaster.stockid, stockmaster.description, stockmaster.units FROM stockmaster INNER JOIN stockcategory ON stockmaster.categoryid=stockcategory.categoryid WHERE (stockcategory.stocktype='F' OR stockcategory.stocktype='M') AND stockmaster.stockid LIKE '%2341234%' AND stockmaster.discontinued=0 AND mbflag='M' ORDER BY stockmaster.stockid LIMIT 20 OFFSET -20 To reproduce it : In WorkOrderEntry, just type in a funny stockid which does not exists and this error shows up. Am I the first one to get it? Seems like the problem comes from the OFFSET -20. Why is it assigning a negative value? Why it does work if the stockid exists, and script works OK? Any help will be welcomed ;-) Regards, Ricard |