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

Shuffle Array
Hi,

I am writing a script for a game that needs players to randomly be assigned a target (ano

LIMIT $start, 10... how to pass last value queried into next page with GET??
Ok I know how to display the first or last 10 results of a query...

$result = mysql_query(&q

IF Statement & Two Tables With Different Echoes
I'm retrieving two tables in a single query using UNION ALL, like so:

Code: $query = "SE

Image upload - determine folder
I have an upload script that may be accessed from different directories. Problem is, the script is m

Forum tutorial
Im a beginner in PHP. Im making a forum(previous questbook, counter and few others) to learn. For no

User input in to variable
Hi all,

I'm sure this is very easy but I'm having another brain freeze!

At the end of

Windows 7
Windows 7 default user account control worries experts. Corporate IT departments should be pleased w

Option box to change variable
Hello, i need help by making a script!

I need to write a file with option box, so a dropdown

ECC6 - Single sign-on
We are in the process of upgrading to ECC 6 which will support single sign on with user passwords al

try catch error
I have been trying try catch but, I can't get it to work. The code opens a non existing file called

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