How do I get the row number from from an sql table query


Posted on 16th Feb 2014 07:03 pm by admin

Hi all

I have a table that I query and it returns a number of rows.
mysql_num_rows($query) = $total
Did you know?Explore Trending and Topic pages for more stories like this.

I want to have next and previous buttons, is there a way of retrieving the current row number, and can you move it backwards and forwards by 1, or do I have to keep a track of the button presses

many thanks
No comments posted yet

Your Answer:

Login to answer
181 Like 51 Dislike
Previous forums Next forums
Other forums

Multithreading design
Hi

I have come up with a Singleton class that manages a pool of database connections. Basical

Syntax error
hi im having a little trobble with this script
-------------------------------------------------

php/xmlrpc class issue
I am working on xml-rpc in php to start with.

I have a class that only has variables defined

bit of help needed
Im about to sort out my registration page for my website by customising a "registration" s

New Login Script
Hi all, i attempted to create a whole new login script witch isnt working for some reason i dont kno

Redirecting Admin
In my members table, I have a field called "perm" and it's set to zero for all members. Ho

Blank record injected into database
I always found several blank records inside my database, although $SESSION is required to insert the

Odd or Even
Inside of a while loop I need to echo several rows of info...easy enough.

In the loop (for th

New to PHP and just trying to understand a little code.
I hope I'm not annoying anyone or breaking the rules but I was wondering about this bit of code righ

Help with explandable category tree
I have the below query:

SELECT l1.id as lev1_id,l2.id as lev2_id,l3.id as lev3_id,l1.categ

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash