Commit: 63290154e7df51c6e8a3b5969c6ebaf020fc4e0d Author: Sherif Ramadan <[email protected]> Sat, 15 Dec 2012 08:19:46 -0500 Parents: 86774530b69041712ab1310220e0c8938c95cf78 Branches: master
Link: http://git.php.net/?p=web/master.git;a=commitdiff;h=63290154e7df51c6e8a3b5969c6ebaf020fc4e0d Log: Adjusted search to use a LEFT JOIN. Changed paths: M manage/user-notes.php Diff: diff --git a/manage/user-notes.php b/manage/user-notes.php index d89ef38..8315ea8 100644 --- a/manage/user-notes.php +++ b/manage/user-notes.php @@ -75,7 +75,7 @@ if (!$action) { if(isset($_REQUEST['keyword'])) { $sql = 'SELECT SUM(votes.vote) AS up, (COUNT(votes.vote) - SUM(votes.vote)) AS down, note.*, UNIX_TIMESTAMP(note.ts) AS ts '. 'FROM note '. - 'JOIN(votes) ON (note.id = votes.note_id) '. + 'LEFT JOIN(votes) ON (note.id = votes.note_id) '. 'WHERE '; if (is_numeric($_REQUEST['keyword'])) { $sql .= 'note.id = ' . (int) $_REQUEST['keyword']; -- PHP Webmaster List Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
