webERP Forum
Database Error 1054 : Unknown column 'categoryid' in 'field list' - Printable Version

+- webERP Forum (http://www.weberp.org/forum)
+-- Forum: webERP Discussion (http://www.weberp.org/forum/forumdisplay.php?fid=1)
+--- Forum: Problems / Bugs? (http://www.weberp.org/forum/forumdisplay.php?fid=8)
+--- Thread: Database Error 1054 : Unknown column 'categoryid' in 'field list' (/showthread.php?tid=1021)



Database Error 1054 : Unknown column 'categoryid' in 'field list' - sidd - 09-16-2013



Hey Everybody,

I started a new post since I did not find this reported in the existing "Problems / Bugs?".

I have recently started working on WebERP and really love it! Thank you all! New to PHP as well Wink

While running through some of the transactions, I noticed an error related to categoryid during the Invoice generation. To be precise "Confirm Dispatch and Invoice".

The error is "Database Error 1054 : Unknown column 'categoryid' in 'field list'"

I investigated further and with a few die($SQL) and echo prnMsg() functions I could finally find out why Big Grin

The PHP script related to this transaction is "ConfirmDispatch_Invoice.php" which calls "includes/GetSalesTransGLCodes.inc".

I found two bugs [caret(`) and extra = sign][/font] in the includes/GetSalesTransGLCodes.inc which I thought should share with you folks so you can fix in the next release. Smile

Diff below:

diff GetSalesTransGLCodes.inc GetSalesTransGLCodes.inc.original
17c17
< $SQL = "SELECT categoryid FROM stockmaster WHERE stockid='" . $StockID . "'";
---
> $SQL = "SELECT categoryid` FROM stockmaster WHERE stockid='" . $StockID . "'";
22a23
>
27d27
<
72c72
< AND stkcat = '" . $StockCategory . "'
---
> AND stkcat = = '" . $StockCategory . "'

Hope this helps!

HAVE FUN!
Sidd


RE: Database Error 1054 : Unknown column 'categoryid' in 'field list' - phil - 09-16-2013

Hi Sidd,

Thanks for your note. Did you download 4.11.0? I believe/hoped I had fixed this in 4.11.1?

If you could confirm the version please so I know if I still have a problem in the latest download!!

You can monitor the changes to the latest code if you subscribe to the web-erp-svn mailing list - which shows the changes made to each script as they are committed to the subversion code repository. If you are interested