Webmaster Forum

Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.


Reply
 
Thread Tools Display Modes
Share |
  #1  
Old 04-25-2013, 07:11 AM
stephen001 stephen001 is offline
Contributing Member
 
Join Date: 04-25-13
Posts: 89
iTrader: 0 / 0%
how to implement Next Previous Functionality in PHP-Javascript-with MySQL

I have a application which has option to show Next Previous, all the data is stored in MySQL.

how can i implement or Query Database again and again on click or Next or Previous Button


i am using Javascript , php and Html.

is there any example for this kind of functionality

Thanks
 
Reply With Quote

Advertisement

Advertisement

  #2  
Old 04-26-2013, 05:58 PM
eagle12 eagle12 is offline
Contributing Member
 
Join Date: 11-30-11
Posts: 137
iTrader: 0 / 0%
This is a pretty open ended question. You can do it 1 of 2 ways. You can pass query variables in the url ie: http://test.com?page=2 ....page=3 etc... using a form or links, or you can use ajax to request the data without loading the new page.

Last edited by J. H. Rasmussen; 04-28-2013 at 01:17 PM.
 
Reply With Quote
  #3  
Old 04-29-2013, 07:38 AM
stephen001 stephen001 is offline
Contributing Member
 
Join Date: 04-25-13
Posts: 89
iTrader: 0 / 0%
Quote:
Originally Posted by eagle12 View Post
This is a pretty open ended question. You can do it 1 of 2 ways. You can pass query variables in the url ie: ....page=3 etc... using a form or links, or you can use ajax to request the data without loading the new page.
is there any tutorial or sample for your 1st example quering page
 
Reply With Quote
  #4  
Old 04-29-2013, 08:22 AM
goripples goripples is offline
Junior Member
 
Join Date: 04-29-13
Posts: 15
iTrader: 0 / 0%
This is about pagination, right? Well, I will not make the code for you, but you will need a query to know how many entries is there to show, and other query with the LIMIT statement (search on google about mysql LIMIT).

Then with that you will know how many entries is there, know depending how many entries per page: how many pages is there. Then generate links like eagle12 told and send back that to the MySql LIMIT.
 
Reply With Quote
  #5  
Old 04-29-2013, 08:30 AM
stephen001 stephen001 is offline
Contributing Member
 
Join Date: 04-25-13
Posts: 89
iTrader: 0 / 0%
thanks for the explanation i think what you told is correct
 
Reply With Quote
  #6  
Old 05-07-2013, 07:31 AM
stephen001 stephen001 is offline
Contributing Member
 
Join Date: 04-25-13
Posts: 89
iTrader: 0 / 0%
Can we do this if I have 3 tables and every table is using different Select statement, i think in that case I cannot paginate
 
Reply With Quote
  #7  
Old 05-11-2013, 05:08 AM
sitesten sitesten is offline
Junior Member
 
Join Date: 05-10-13
Posts: 44
iTrader: 0 / 0%
If these tables are related you may JOIN them in a single query.
 
Reply With Quote
Go Back   Webmaster Forum > Web Development > Coding Forum

Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Available for HIRE] An experienced php mysql javascript freelancer (Zend, Wordpress) alecksmart Sell Web Services 0 08-16-2012 08:43 AM
Experienced php mysql javascript freelancer professional alecksmart Sell Web Services 0 10-05-2011 09:37 AM
Conversion JavaScript search to MySQL / PHP sodul Coding Forum 22 01-18-2011 03:45 PM


V7N Network
Get exposure! V7N I Love Photography V7N SEO Blog V7N Directory


All times are GMT -7. The time now is 02:51 PM.
Powered by vBulletin
Copyright 2000-2014 Jelsoft Enterprises Limited.
Copyright © 2003 - 2018 VIX-WomensForum LLC