php - pagination and row numbering -


I want to print an attached number with each term. It's like every platform.

I currently use it:

  $ i = 0; While ($ post = mysql_fetch_assoc ($ rs)): $ i ++;  

Let's say I print 5 posts per page

This is what happens:

  # 1 first post # 2 second post # 3 third post # 4 fourth post # 5 5th post, 2 # 1 6th post on page # 2 7th post # 3 8th post # 4 9th post # 5 Go to 10th post < Code>  

I do not want to do this, I want to remove the most numbers from the first page

SQL:

  SELECT u .group_id, u.username, u.title, p. Poster, P.M.Sece, P. UID = PPster Inner Group Group GSIG GIGIID = UFMIP_ID WHERE P. as Thread_ID, GG_title, GG_UserChittlest Post. Thread_ID = $ id LIMIT $ startIndex, $ perPage  

You must recognize a variable that Multiply the page number by the number of elements per page that you have on the page, unique ID of the first element of page N.


Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -