/* This simple script automates the creation of navigation links for the datas extracted from the database.Pls Feel free to modify it and mailme back.Thanx Author: Sam George; ocptime@rediffmail.com Licence: GPL. */
// No Files are included and stylesheets and other config files can be // included according to your wish. // Uses ADO_DB for database abstraction and no documentation as the script is fairly straight forward
By : ocptime
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <!-- Creation Date: <?=Date("d/m/Y")?> --> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta name="Generator" content="Dev-PHP 1.9.4"> <title>Document Title</title> </head> <body> <?php // Pagination script
/* This simple script automates the creation of navigation links for the datas extracted from the database.Pls Feel free to modify it and mailme back.Thanx Author: Sam George; ocptime@rediffmail.com Licence: GPL. */
// No Files are included and stylesheets and other config files can be // included according to your wish. // Uses ADO_DB for database abstraction and no documentation as the script is fairly straight forward
$sqlCount="SELECT count(u.id) FROM msg_mail as m, user as u WHERE m.userTo='$userId' AND m.status <> 'trash'";
$rsCount = $db->Execute($sqlCount);
$totalrows = $rsCount->fields[0];
$limit=5;
if(empty($page)){ $page = 1; }
$limitvalue = ($page - 1) * $limit;
$sql = "SELECT m.mailId, m.userTo, m.userFrom, ".$db->substr."(m.subject,1,25) as subject, m.status, u2.name, u.userName, m.date FROM msg_mail as m, user as u WHEREm.userTo='$userId' AND m.status <> 'trash' ORDER BY m.date DESC LIMIT $limitvalue, $limit";
DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.