Commit: 04d9585c4ae91b1ae588d505e302e2fc7cb70d2a Author: Sherif Ramadan <[email protected]> Thu, 13 Dec 2012 10:01:48 -0500 Parents: f14e2fc16ef759daf12367333ed874577435e729 Branches: master
Link: http://git.php.net/?p=web/master.git;a=commitdiff;h=04d9585c4ae91b1ae588d505e302e2fc7cb70d2a Log: Forgot the spaces in the concatenated query strings. Changed paths: M manage/user-notes.php Diff: diff --git a/manage/user-notes.php b/manage/user-notes.php index 7b680f2..c9e437c 100644 --- a/manage/user-notes.php +++ b/manage/user-notes.php @@ -80,21 +80,21 @@ if (!$action) { /* Added new voting information to be included in note from votes table. */ /* First notes */ if ($type == 1) { - $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)". + $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) ". "GROUP BY note.id ORDER BY note.id ASC LIMIT $limit, 10"; /* Minor notes */ } else if ($type == 2) { - $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)". + $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) ". "GROUP BY note.id ORDER BY LENGTH(note.note) ASC LIMIT $limit, 10"; /* Last notes */ } else { - $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)". + $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) ". "GROUP BY note.id ORDER BY note.id DESC LIMIT $limit, 10"; } } -- PHP Webmaster List Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
