This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Dreamweaver > December 2005 > Re: I will be forever grateful if somebody, ANYBODY, can tell me how to make this thing





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Re: I will be forever grateful if somebody, ANYBODY, can tell me how to make this thing
John Waller

2005-12-29, 3:18 am

In your previous post asking the same question I asked how you want to sort
it.

--
Regards

John Waller


Neil

2005-12-29, 6:14 am

Nextensio will do the job (and much more) but costs money ...
http://www.interaktonline.com/Produ...ensio/Overview/

"Lady18wheels" <webforumsuser@macromedia.com> wrote in message
news:dovkdl$mmq$1@forums.macromedia.com...
>I can only work with PHP ... and perl, maybe? - my host/server can't handle
>ASP
> or ColdFusion.
> Operating system Linux
> Apache version 1.3.33 (Unix)
> PHP version 4.3.10
> mysql version 4.0.25-standard
>
> I know how to create recordsets and dynamic tables in Dreamweaver. I need
> to
> be able to sort the columns though. An example of what I've got is here
>
> http://www.lady18wheels.com/phpbb_data/by_userID_02.php
>
> It's pulling from the database of my phpBB2 message board.
>
> The code looks like this:
>
> <?php require_once('Connections/conn01.php'); ?>
> <?php
> $currentPage = $_SERVER["PHP_SELF"];
>
> $maxRows_Recordset1 = 100;
> $pageNum_Recordset1 = 0;
> if (isset($_GET['pageNum_Recordset1'])) {
> $pageNum_Recordset1 = $_GET['pageNum_Recordset1'];
> }
> $startRow_Recordset1 = $pageNum_Recordset1 * $maxRows_Recordset1;
>
> mysql_select_db($database_conn01, $conn01);
> $query_Recordset1 = "SELECT * FROM phpbb_users ORDER BY user_id DESC";
> $query_limit_Recordset1 = sprintf("%s LIMIT %d, %d", $query_Recordset1,
> $startRow_Recordset1, $maxRows_Recordset1);
> $Recordset1 = mysql_query($query_limit_Recordset1, $conn01) or
> die(mysql_error());
> $row_Recordset1 = mysql_fetch_assoc($Recordset1);
>
> if (isset($_GET['totalRows_Recordset1'])) {
> $totalRows_Recordset1 = $_GET['totalRows_Recordset1'];
> } else {
> $all_Recordset1 = mysql_query($query_Recordset1);
> $totalRows_Recordset1 = mysql_num_rows($all_Recordset1);
> }
> $totalPages_Recordset1 =
> ceil($totalRows_Recordset1/$maxRows_Recordset1)-1;
>
> $queryString_Recordset1 = "";
> if (!empty($_SERVER['QUERY_STRING'])) {
> $params = explode("&", $_SERVER['QUERY_STRING']);
> $newParams = array();
> foreach ($params as $param) {
> if (stristr($param, "pageNum_Recordset1") == false &&
> stristr($param, "totalRows_Recordset1") == false) {
> array_push($newParams, $param);
> }
> }
> if (count($newParams) != 0) {
> $queryString_Recordset1 = "&" . htmlentities(implode("&", $newParams));
> }
> }
> $queryString_Recordset1 = sprintf("&totalRows_Recordset1=%d%s",
> $totalRows_Recordset1, $queryString_Recordset1);
> ?>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
> "http://www.w3.org/TR/html4/loose.dtd">
> <html>
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
> <title>Sorted by UserID</title>
> <style type="text/css">
> <!--
> .style1 {
> font-family: Tahoma;
> font-size: 10px;
> font-weight: bold;
> color: #000066;
> }
> -->
> </style>
> </head>
>
> <body>
> <span class="style1">Records <?php echo ($startRow_Recordset1 + 1) ?> to
> <?php
> echo min($startRow_Recordset1 + $maxRows_Recordset1,
> $totalRows_Recordset1) ?>
> of <?php echo $totalRows_Recordset1 ?></span>
> <table border="2" class="style1">
> <tr>
> <td><div align="center">user_id</div></td>
> <td><div align="center">user_lastvisit</div></td>
> <td><div align="center">user_regdate</div></td>
> <td><div align="center">user_posts</div></td>
> </tr>
> <?php do { ?>
> <tr align="center" valign="top">
> <td><div align="center"><?php echo $row_Recordset1['user_id'];
> ?></div></td>
> <td><div align="center"><!-- <?php echo $row_Recordset1['user_lastvisit'];
> ?>
> --><?php echo date("m/d/y", ($row_Recordset1['user_lastvisit']));
> ?></div></td>
> <td><div align="center"><!--<?php echo $row_Recordset1['user_regdate']; ?>
> --><?php echo date("m/d/y", ($row_Recordset1['user_regdate']));
> ?></div></td>
> <td><div align="center"><?php echo $row_Recordset1['user_posts'];
> ?></div></td>
> </tr>
> <?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
> </table>
>
> <table border="0" width="50%" align="left">
> <tr align="left">
> <td width="23%"><?php if ($pageNum_Recordset1 > 0) { // Show if not first
> page
> ?>
> <a href="<?php printf("%s?pageNum_Recordset1=%d%s", $currentPage, 0,
> $queryString_Recordset1); ?>">First</a>
> <?php } // Show if not first page ?>
> </td>
> <td width="31%"><?php if ($pageNum_Recordset1 > 0) { // Show if not first
> page
> ?>
> <a href="<?php printf("%s?pageNum_Recordset1=%d%s", $currentPage, max(0,
> $pageNum_Recordset1 - 1), $queryString_Recordset1); ?>">Previous</a>
> <?php } // Show if not first page ?>
> </td>
> <td width="23%"><?php if ($pageNum_Recordset1 < $totalPages_Recordset1)
> { //
> Show if not last page ?>
> <a href="<?php printf("%s?pageNum_Recordset1=%d%s", $currentPage,
> min($totalPages_Recordset1, $pageNum_Recordset1 + 1),
> $queryString_Recordset1);
> ?>">Next</a>
> <?php } // Show if not last page ?>
> </td>
> <td width="23%"><?php if ($pageNum_Recordset1 < $totalPages_Recordset1)
> { //
> Show if not last page ?>
> <a href="<?php printf("%s?pageNum_Recordset1=%d%s", $currentPage,
> $totalPages_Recordset1, $queryString_Recordset1); ?>">Last</a>
> <?php } // Show if not last page ?>
> </td>
> </tr>
> </table>
>
>
> </body>
> </html>
> <?php
> mysql_free_result($Recordset1);
> ?>
>
>
>
> I will be forever grateful if somebody, ANYBODY, can tell me how to make
> this
> thing sort!
>



Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews