DB2 fetch failure error

2019-06-01 02:50发布

问题:

Am using DB2 database connection with PHP. When I run the particular query, it throws the below error

Error : db2_fetch_assoc(): Fetch Failure in...

The query will be like this.

SELECT UNIX_TIMESTAMP(concat('2011-07-18 ', hour)) AS orderTime from schedules

The query executes well. But When I try to fetch the records, it throws error. The hour value will be like '08:30:00'

回答1:

You Should run the same query on DB2 control center or db2cmd first, Then error can be more clear.

Moreover you can share rows of schedules table to understand the exact problem.



标签: db2 fetch