This topic is locked
[SOLVED]

 More than 1 SQL Query Problem

4/22/2011 5:58:05 AM
PHPRunner General questions
A
angelcause author

I am new in Phprunner and cant understand how to calculate in 2 fields, if I am not able to explain please check the below code and the error generated below.
SQL

SELECT ADID,

Date of Booking,

AdCount,

Ad Type,

Company,

Name,

NoChnls,

AdDuration,

TAirTime,

StartDate,

StopDate,

StopDate-StartDate AS DaysRemaining,

Billed,

Received,

Received-Billed AS Balance,

Receivedby

FROM ad booking form
Now when i run this database the below error is generated
Record was NOT added. 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 '-Billed, Receivedby) values ('04/18/2011 ', 1, 'Scroll', 'Maptechie', 'Ali AHmed' at line 1
When I run the db with any one of the above like DAYSREMAINING or BALANCE the db runs fine.

Sergey Kornilov admin 4/22/2011

You need to remove fields DaysRemaining and Balance from Edit/Add pages. This can be done on 'Choose fields' screen.