[PHP] prev next links

2002-02-04 Thread Kunal Jhunjhunwala

Hey,
Does anyone know of a well written example of this? I have seen so many
examples, but the over head just seems to be too much... does anyone have a
smooth and well written routine?
Regards,
Kunal Jhunjhunwala


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] prev next links

2002-02-04 Thread Joel Boonstra

 Does anyone know of a well written example of this? I have seen so many
 examples, but the over head just seems to be too much... does anyone have a
 smooth and well written routine?
 Regards,
 Kunal Jhunjhunwala

I think this may help out.  I wrote a site that has a daily devotional on
it, and contains links to previous and next days.  Here's the code:

?php
// assume that $month, $day, $year, contain the current month, day, year
// could also use direct calls to date() instead, if this is for today
list ($prev_year, $prev_month, $prev_day) =
  split ( , date(Y m d, mktime(0,0,0,$month,$day-1,$year)));
list ($next_year, $next_month, $next_day) =
  split ( , date(Y m d, mktime(0,0,0,$month,$day+1,$year)));

// build your links
// this will, of course, change with your dating schema
$prev_link = http://yourdomain.com/?$prev_year-$prev_month-$prev_day;
$next_link = http://yourdomain.com/?$next_year-$next_month-$next_day;

// display them
print a href=\$prev_link\yesterday/abr;
print a href=\$next_link\tomorrow/a;
?

This doesn't take into account whether or not yesterday or tomorrow's
objects or files or whatever actually exists.  Since that is
site-specific, you'll need to add that sort of logic yourself.

Hope that helps!

-- 
[ joel boonstra | [EMAIL PROTECTED] ]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] prev next links

2002-02-04 Thread Joel Boonstra

 // build your links
 // this will, of course, change with your dating schema
 $prev_link = http://yourdomain.com/?$prev_year-$prev_month-$prev_day;
 $next_link = http://yourdomain.com/?$next_year-$next_month-$next_day;

Sorry, I omitted the closing quote mark on these lines.  Here is a
non-syntax-error-ridden version:

?php
$prev_link = http://yourdomain.com/?$prev_year-$prev_month-$prev_day;;
$next_link = http://yourdomain.com/?$next_year-$next_month-$next_day;;
?

Sorry!

-- 
[ joel boonstra | [EMAIL PROTECTED] ]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Prev Next Buttons

2002-01-22 Thread Alawi


How cam I make Prev Next Buttons with 

ODBC+ACCESS XP by PHP :(




Re: [PHP] Prev Next Buttons

2002-01-22 Thread Joffrey van Wageningen

phpbuilder has a good article on prevnext buttons, the code is based on
mysql but take a look at the mysql  odbc functions... view, compare and
adjust to your needs:

http://www.phpbuilder.com/columns/rod20001214.php3

with kind regards,
Joffrey van Wageningen
ne2000.nl

- Original Message -
From: Alawi [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, January 22, 2002 4:06 PM
Subject: [PHP] Prev Next Buttons



How cam I make Prev Next Buttons with

ODBC+ACCESS XP by PHP :(




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Prev ... Next

2001-12-23 Thread Rambo Amadeus

Hi,
I have about 100 names in mysql. How can i display them in groups of 10, and
have next and previous links.

Thanks


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Prev ... Next

2001-12-23 Thread Andrey Hristov

The sql is
select name from  members limit offset,10;

you have to generate offet which _must_ be an integer.

Regards,
Andrey  Hristov


- Original Message - 
From: Rambo Amadeus [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, December 23, 2001 6:06 PM
Subject: [PHP] Prev ... Next


 Hi,
 I have about 100 names in mysql. How can i display them in groups of 10, and
 have next and previous links.
 
 Thanks
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]