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

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

Website Direction...
I recently used this code to try and make it so the page loads as http://www.domain.com/ when you ty

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

Sessions work for me and not others?
I'm having a bit of bad luck with sessions. In the past they have worked fine for me, but this time

Re-Order by ID Number
I have a cms set up for inputting an image, thumb, title, pdf, and eps. When input the database ass

Basic Forum Tutorial
Hi, I'm new to PHP. I want to build a basic forum for my site using PHP and MySQL. I've searched t

What's best way to get a user's Word doc converted to simple html and images?
Hi all,

I was just wondering if anybody has any experience of this.
Basically, I'm buildin

array & querys help/advice.
Ok so here goes , I have a mysql database and basically here's what I need to do.

// foreach

shoping cart issues
i´ve wrote this and works when i add an item to, my cart, but when i want to add othrer item just

query help
Hi experts.

i have a table rep2 like this
PROD_COD ACCT_NO DUE_DAYS BALANCE

SQl num_rows problem
when i try to count rows from an SQL select i get an warning

Code: [Select]$countviews = mysq

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