This topic is locked

SQL Results

10/10/2017 11:07:04 AM
PHPRunner General questions
P
pelican author

Hello,
Can anyone please help, I am not getting the results that are expected from a query.
I thought this was a simple subtraction but I have missed something
The SQL query:
SELECT

odo start,

odo end,

odo end - odo start AS total

FROM logbook
The results:
28 59 3331

61 92 3331
So the total should be 31 but the results that I am getting is 3331
If anyone can help that would be great

Sergey Kornilov admin 10/10/2017

This sounds quite strange. Maybe some sort issue with the data type, i.e. those fields are not numeric?

P
pelican author 10/11/2017



This sounds quite strange. Maybe some sort issue with the data type, i.e. those fields are not numeric?


Cant sort this out

Have done the same query direct in to phpMyAdmin and get the correct results so this error only happens in phprunner
fiels are numeric.
Any ideas on what to do?

Sergey Kornilov admin 10/11/2017

Contact support directly sending a SQL script that creates this table and some sample data and we'll investigate it.