Jump to content

[SOLVED] something wrong with query


Gnub

Recommended Posts

The query is used for pagination, it worked before i added the Count() part.

 

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 '*), DATE_FORMAT(`DepartureDate`, '%a %D %b') AS revised_date, (`Price`-(`FLIGHTS' at line 1

 

$tsql = "Select Count(`Teletext`.*), DATE_FORMAT(`DepartureDate`, '%a %D %b') AS revised_date, (`Price`-(`FLIGHTS`+`ACCOM`)) AS YMARGIN FROM `Teletext` WHERE ". $From . $To . $Star . $BoardB . $Night ." `DepartureDate` BETWEEN '$DateFrom' AND '$DateTo' Order by Price ASC LIMIT $start,$display;"; 

 

thanks in advance

 

Gnub

Link to comment
https://forums.phpfreaks.com/topic/45040-solved-something-wrong-with-query/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.