Create a pagination with php, sqlServe (connected via pdo) and ajax

0

I have custom of using mysql to program with php, but I had to switch to sql Serve. I have problems having mysql in the use of limit to create pagination however the sql Serve it seems to me that they do not have this resource, looking for pages in internent I found a code that creates paging using subquery. But I would like to know if sql Serve really does not have any features similar to the mysql limit. To load the page use ajax in jquery, when the user clicks on my page index automatically reload the page.

    
asked by anonymous 25.05.2016 / 19:05

1 answer

0

I am using the 2014 version of sql server . In mysql the query would look like:

select * from nome_tabela where id_contrato >= contrato_inicial  and id_contrato <= contrato_fim limit inicio,fim;
    
26.05.2016 / 04:52