cvs: php-master-web /fetch user-notes.php
| From: | jim winstead | Date: | Wed, 21 Nov 2001 01:27:37 +0000 |
| Subject: | cvs: php-master-web /fetch user-notes.php | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-7472@lists.php.net to get a copy of this message | ||
jimw Tue Nov 20 20:27:37 2001 EDT
Modified files:
/php-master-web/fetch user-notes.php
Log:
no longer using 'removed' column to mark deletion
Index: php-master-web/fetch/user-notes.php
diff -u php-master-web/fetch/user-notes.php:1.1 php-master-web/fetch/user-notes.php:1.2
--- php-master-web/fetch/user-notes.php:1.1 Fri Sep 21 15:01:08 2001
+++ php-master-web/fetch/user-notes.php Tue Nov 20 20:27:37 2001
@@ -9,22 +9,9 @@
@mysql_select_db("php3")
or exit;
-if ($since) {
- mysql_query("CREATE TEMPORARY TABLE updated TYPE = HEAP SELECT DISTINCT sect FROM note WHERE
ts > FROM_UNIXTIME($since) OR updated > FROM_UNIXTIME($since) OR removed")
- or exit;
- # purge entries marked for removal
- mysql_query("DELETE FROM note WHERE removed");
-}
-
$query = "SELECT DISTINCT id,note.sect,user,note,UNIX_TIMESTAMP(ts) AS ts,";
$query .= "IF(votes=0, 10, rating/votes) AS rate";
-$query .= " FROM note";
-if ($since) {
- $query .= ",updated WHERE note.sect=updated.sect AND NOT removed";
-}
-else {
- $query .= " WHERE NOT removed";
-}
+$query .= " FROM note WHERE NOT removed";
$query .= " ORDER BY sect,rate DESC,ts";
$res = @mysql_query($query) or exit;