Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Database Error 1054 : Unknown column 'categoryid' in 'field list'
09-16-2013, 04:42 AM
Post: #1
Database Error 1054 : Unknown column 'categoryid' in 'field list'
[/font]

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]
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
Find all posts by this user
Quote this message in a reply
09-16-2013, 06:56 AM (This post was last modified: 09-16-2013 06:57 AM by phil.)
Post: #2
RE: Database Error 1054 : Unknown column 'categoryid' in 'field list'
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

Phil Daintree
webERP Admin
Logic Works Ltd
http://www.logicworks.co.nz
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)