开发者

HOWTO do relative seek on a mysql resultset with PHP ? / HOWTO get currentrownumber of mysql resultset?

I want to do relative seek on a mysql resultset, more specifically +1/-1 seeks.

The 开发者_Go百科function mysql_data_seek() provides absolute seek and there does not seem to any method to get current row number!! (Should I implement my own counter, it would require updating a large code base)

For +1, mysql_fetch_array() would do the trick but still I need a solution for -1.


So there is no solution.

Seems to be a design flaw in php mysql api. It provides the expensive operation (seeking) but not the cheap one ( getting current row number).

EDIT: I checked with PHP team, mysql api is frozen and only accept bug fix. I should switch to mysqli.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜