Hi,
I have an MYSQL Query , that excetues in the MYSQL Database, but it shows an error while running that query in PHP. The Query is,
SELECT a.stock_item_code AS PRODUCT_CODE,a.stock_desc AS DESCRIPTION,sum(b.qty_ordered) AS STOCK_DRAWN,a.replenish_amt as INTO_STOCK,a.intial_stock_amt AS BALANCE_B_FWD,a.critical_level AS REORDER_LEVEL,sum (a.intial_stock_amt+a.replenish_amt-0) as BALANCE_C_FWD FROM cf_stock a LEFT JOIN cf_pcorder b ON a.stock_id = b.stock_id GROUP BY a.stock_item_code
The error occuring while running the query in PHP,
It shows an error
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 '(a.intial_stock_amt+a.replenish_amt-0) as BALANCE_C_FWD FROM cf_stock a LEFT JOI' at line 1.
Thanks in Advance.
1 1236 PEB 1,418
Expert 1GB
Hi,
I have an MYSQL Query , that excetues in the MYSQL Database, but it shows an error while running that query in PHP. The Query is,
SELECT a.stock_item_code AS PRODUCT_CODE,a.stock_desc AS DESCRIPTION,sum(b.qty_ordered) AS STOCK_DRAWN,a.replenish_amt as INTO_STOCK,a.intial_stock_amt AS BALANCE_B_FWD,a.critical_level AS REORDER_LEVEL,sum (a.intial_stock_amt+a.replenish_amt-0) as BALANCE_C_FWD FROM cf_stock a LEFT JOIN cf_pcorder b ON a.stock_id = b.stock_id GROUP BY a.stock_item_code
The error occuring while running the query in PHP,
It shows an error
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 '(a.intial_stock_amt+a.replenish_amt-0) as BALANCE_C_FWD FROM cf_stock a LEFT JOI' at line 1.
Thanks in Advance.
Hi,
What is the goal to substract zero in your expression?
And if you put ; at the end of your SQL?
:)
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Phil Powell |
last post by:
Actually the client is saying it sometimes happens and sometimes
doesn't happen, and when they refresh their screen it clears itself (I
assume the memory clears).
Here is line 1135:
$result =...
|
by: AIM |
last post by:
Error in msvc in building inheritance.obj to build hello.pyd
Hello,
I am trying to build the boost 1.31.0 sample extension hello.cpp.
I can not compile the file inheritance.cpp because the two...
|
by: Tony Wright |
last post by:
Hi,
I am having a problem installing an msi for a web site. The error
message I am getting is:
"The specified path 'http://mipdev05/features/Fas2' is unavailable.
The Internet Information...
|
by: Aravind |
last post by:
we have two files:
1. rc4.c (defines one function "create_pin()")
2. MyImpl.c(calling the function "create_pin()"),This implements JNI
method.
1.When I am trying to create .dll file with one...
|
by: deko |
last post by:
I use this convention frequently:
Exit_Here:
Exit Sub
HandleErr:
Select Case Err.Number
Case 3163
Resume Next
Case 3376
Resume Next
|
by: p |
last post by:
WE had a Crystal 8 WebApp using vs 2002 which we upgraded to VS2003. I also
have Crystal 9 pro on my development machine. The web app runs fine on my
dev machine but am having problems deploying....
|
by: phillip.s.powell |
last post by:
mysql> update student set uuid = concat(UUID(), '_',
'asdfasdfasdfasdf') where uuid is null or uuid = '' limit 1;
ERROR 1270 (HY000): Illegal mix of collations
(utf8_general_ci,COERCIBLE),...
|
by: hyperpau |
last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding.
I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com).
Ergo, I...
|
by: hyperpau |
last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding.
I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com).
Ergo, I...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |