Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Database Error 1054 : Unknown column 'categoryid' in 'field list'
09-16-2013, 04:42 AM,
#1
Database Error 1054 : Unknown column 'categoryid' in 'field list'


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
Reply


Messages In This Thread
Database Error 1054 : Unknown column 'categoryid' in 'field list' - by sidd - 09-16-2013, 04:42 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)