Jump to content

NEED HELP on this syntax.


pokoot

Recommended Posts

Hi thanks for reading. I got this error running on the script, but works perfectly on the mssql gui interface:

$paging = "
                    GO 
                    WITH ordering AS (
                        SELECT 
                            * , 
                            ROW_NUMBER() OVER (ORDER BY type ASC , id ASC ) AS 'row_number' 
                        FROM config
                    ) 
                    SELECT * FROM ordering
                    WHERE row_number BETWEEN 0 AND 20
                  " ;

mssql_query( $paging_query );

 

Warning: mssql_query() [function.mssql-query]: message: Incorrect syntax near 'ordering'. (severity 15)

 

 

Hope some1 can help :( :(

 

 

Link to comment
https://forums.phpfreaks.com/topic/244992-need-help-on-this-syntax/
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.