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

MYSQL INSERT ID NOT WORKING
Code: $id = mysql_insert_id();
header("Location: ./?view=$id");
Why $id pulling blan

Saving PHP output as a file
I wondered if anyone knows how to save the rendered output of a PHP script as a file?

I have

Secure FTP
Hi experts,
There is no SFTP action in MII workbench.
This means it needs developing custo

Need help making login verification cleaner...
I use the below to verify user login. I first check the cookie for the id, ip and a unique id. If it

WHYISNT THIS MYSQL STATEMNT NOT WORKING? (php)
caps because its absolutely rediculous.
i dontunderstand why its not working. there is a column c

Mysql error message
help me find out what this error message means:

"Duplicate entry '0' for key 'PRIMARY'&q

Logic question
im wondering what's the best method to do the above list:

it is for alliance @ MMORPG game

Checkbox info wont include in Mailto
Hey, im new to php.
Basically I have made a form to request which type of job(s) are needed, whic

"SEO" URLs
Hey, I'm wondering how to go about creating and using these types of URLs. I'm presuming it's PHP th

validating url
im trying to validate url's sent to me by a form
the url's im collecting are for placing banners

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