summaryrefslogtreecommitdiff
path: root/display_books.inc
diff options
context:
space:
mode:
authorSashi202022-11-04 13:04:39 +0530
committerSashi202022-11-04 13:04:39 +0530
commit000d2209153b41287719164fee3261dd3ce3a73d (patch)
tree67100971fc9671fbd06c0f8f05352831182039ab /display_books.inc
parent5944ef9f84fff7d14279fe123983b8a09b2b9953 (diff)
downloadr_textbook_companion-000d2209153b41287719164fee3261dd3ce3a73d.tar.gz
r_textbook_companion-000d2209153b41287719164fee3261dd3ce3a73d.tar.bz2
r_textbook_companion-000d2209153b41287719164fee3261dd3ce3a73d.zip
Display completed books in descending order
Diffstat (limited to 'display_books.inc')
-rwxr-xr-xdisplay_books.inc4
1 files changed, 2 insertions, 2 deletions
diff --git a/display_books.inc b/display_books.inc
index 97e4543..016162c 100755
--- a/display_books.inc
+++ b/display_books.inc
@@ -17,7 +17,7 @@ ORDER BY po.creation_date DESC
";
$result = db_query($query);
$proposal_rows = array();
- $i = 1;
+ $i = $result->rowCount();
$category_data = _tbc_list_of_category($preference_data->category);
$output = "<hr>";
while ($row = $result->fetchObject())
@@ -37,7 +37,7 @@ ORDER BY po.creation_date DESC
$row->book . "<br><br>[ Author: " . $row->author . ", Publisher: " . $row->publisher . ", Year: " . $row->year . ", Edition: " . $row->edition . ", ISBN: " . $row->isbn . " ]",
$category
);
- $i++;
+ $i--;
} //$row = $result->fetchObject()
$preference_header = array(
'No',