Limiting query in MS Access in PHP

戏子无情 提交于 2019-12-25 01:55:09

问题


I`m rewriting an application that use MS Access as the database.

I was able to connect and fetch data from tables, but how can I apply limit and offset like SELECT * FROM tablename LIMIT 10 0?


回答1:


SELECT TOP 10 * FROM tablename

Similar thread(no offset allowed in access)




回答2:


In Access the syntax is TOP n;

select top 10 * from tablename



回答3:


http://phplens.com/lens/adodb/docs-adodb.htm#ex8 is much better solution. You can modify it a bit to suit your needs. By default it return in html table, which can be modified to get field names and specific number of rows as array



来源:https://stackoverflow.com/questions/6355886/limiting-query-in-ms-access-in-php

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!