I take data from DB2 database using ODBC connection and PHP script (Apache2+PHP4 on Windows 2000). My DB2 version is 4, its platform is AS/400.
Everything is OK, it works quite good, but I have a little problem with divide query results. In MySQL database I used syntax: "SELECT ... FROM ... WHERE .. LIMIT X,Y", but it doesn't work properly with DB2. I'm know that permitted is syntax: "... FETCH FOR FIRST X ROWS ONLY", but it is useful only for "X" first rows. Suppose that my query gives 500 rows. At first I need really first 50 rows (for example), but later I need records from 50 to 100, 150 to 200 etc. (just divide received data).
In this case, using MySQL I just added ".. LIMIT X,Y" (providing properly variables instead of X and Y) and it worked good.
Does anybody had such problem?
Sorry if smilar post is in this forum, I sought but I didn't find anything. In this case just please give me a link to this post.
On the other hand, I'd be delighted to get to know other experiences about connecting PHP->DB2 or ASPX->DB2 via ODBC.