Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 06-22-2005, 02:52 AM   PM User | #1
chleng
New Coder

 
Join Date: Jun 2005
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
chleng is an unknown quantity at this point
How to separate records retreived into different pages

Hi,

$callDetailsSQL ="select calls.date as date, calls.time as time, ceil(calls.duration_incoming/60) as incoming_duration, ceil(calls.duration_outgoing/60) as outgoing_duration, calls.did as mobile, calls.cli as cli, calls.destination as destination, round(calls.rate_incoming+calls.rate_outgoing,2) as rate, round(calls.amount,2) as charge from calls, useraccounts, billingaccounts where calls.amount>0 and calls.did=useraccounts.mobile and useraccounts.billingid=billingaccounts.id and useraccounts.billingid='";

$callDetailsSQL .= $billingid."' and month(date)='";
$callDetailsSQL .= $Month."' and year(date)='";
$callDetailsSQL .= $Year."' order by calls.call_id desc";

using the above SQL, I generate a list of records, so how can I generate previous links and next links so that in each page I can only see a maximum of 20 records.

thks
chleng is offline   Reply With Quote
Old 06-22-2005, 04:11 AM   PM User | #2
Velox Letum
Senior Coder

 
Join Date: Apr 2005
Location: Colorado, United States
Posts: 1,208
Thanks: 0
Thanked 0 Times in 0 Posts
Velox Letum is an unknown quantity at this point
Take a look at this pagination tutorial and see if that can't help get you started. Otherwise Google it, I found 100s of tutorials on Pagination, many database driven.
__________________
"$question = ( to() ) ? be() : ~be();"
Velox Letum is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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


All times are GMT +1. The time now is 06:44 PM.


Advertisement
Log in to turn off these ads.