in reply to Strange error when .cgi deployed on a different machine

All I can say is no wonder it took you a while to get the parenthesizing right when you've formatted (or haven't formatted) the query like that. What's wrong with some return characters in there?
my $sql=" SELECT idNum, (First(price)-Last(price)) AS difference, Min(dateCreated) AS minDate, Max(dateCreated) AS maxdate, Last(mobile) AS lastMobile, Last(contents) AS lastContents, (( (First(price)-Last(price)) /First(price) )*100) AS percentC +hange, Last(price) AS lastPrice, Last(state) AS lastState, Last(contact), Last(year) FROM carAdds GROUP BY idNum HAVING (( Last([year]))>=$yearmodel) ORDER BY (( (First(price)-Last(price)) /First(price) )*100) DESC ";

Doesn't that look better? It'll be much easier to debug and change, and understand for the next guy, too.

Replies are listed 'Best First'.
Re^2: Strange error when .cgi deployed on a different machine
by sirius98 (Acolyte) on Mar 10, 2005 at 10:13 UTC
    ok thanks jasper