cvs: php-gtk-web /include shared-manual.inc /manual browse.php
| From: | Colin Viebrock | Date: | Fri, 10 Aug 2001 19:29:11 +0000 |
| Subject: | cvs: php-gtk-web /include shared-manual.inc /manual browse.php | ||
| Groups: | php.gtk | ||
| Request: | Send a blank email to php-gtk+get-2749@lists.php.net to get a copy of this message | ||
cmv Fri Aug 10 15:29:11 2001 EDT
Modified files:
/php-gtk-web/include shared-manual.inc
/php-gtk-web/manual browse.php
Log:
Index: php-gtk-web/include/shared-manual.inc
diff -u php-gtk-web/include/shared-manual.inc:1.20 php-gtk-web/include/shared-manual.inc:1.21
--- php-gtk-web/include/shared-manual.inc:1.20 Fri Aug 10 15:25:21 2001
+++ php-gtk-web/include/shared-manual.inc Fri Aug 10 15:29:11 2001
@@ -233,6 +233,7 @@
$user = 'nobody';
$pass = '';
$db_id = @mysql_pconnect($host, $user, $pass);
+
$query = "SELECT *, UNIX_TIMESTAMP(ts) AS xwhen, IF(votes=0, 0, rating/votes) AS rate FROM
note " .
"WHERE sect='$title' OR sect='$id' ORDER BY rate DESC, id";
Index: php-gtk-web/manual/browse.php
diff -u php-gtk-web/manual/browse.php:1.5 php-gtk-web/manual/browse.php:1.6
--- php-gtk-web/manual/browse.php:1.5 Fri Aug 10 15:23:39 2001
+++ php-gtk-web/manual/browse.php Fri Aug 10 15:29:11 2001
@@ -39,8 +39,9 @@
echo '<table border="0" cellpadding="4" cellspacing="0"
width="100%">';
-$query = "SELECT *, UNIX_TIMESTAMP(ts) AS xwhen, if(votes=0, 0, rating/votes) AS rate FROM
note " .
- "WHERE sect='$title' OR sect='$id' ORDER BY rate DESC, id";
+$query = "SELECT *, UNIX_TIMESTAMP(ts) AS xwhen, IF(votes=0, 0, rating/votes) AS rate FROM
note " .
+ "WHERE sect LIKE '%$let' ORDER BY sect, rate DESC, id";
+
$result = mysql_query($query) or die(mysql_error());
$numrows = mysql_num_rows($result);