diff options
author | Sashi20 | 2022-11-04 13:07:48 +0530 |
---|---|---|
committer | Sashi20 | 2022-11-04 13:07:48 +0530 |
commit | 03e1c7520e6214891c73a9f2de475c3c7684d26a (patch) | |
tree | 01f0a06fe1cdbebb12cebec63cb60d86ddbf324c | |
parent | 000d2209153b41287719164fee3261dd3ce3a73d (diff) | |
download | r_textbook_companion-03e1c7520e6214891c73a9f2de475c3c7684d26a.tar.gz r_textbook_companion-03e1c7520e6214891c73a9f2de475c3c7684d26a.tar.bz2 r_textbook_companion-03e1c7520e6214891c73a9f2de475c3c7684d26a.zip |
Update completed books table
-rwxr-xr-x | display_books.inc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/display_books.inc b/display_books.inc index 016162c..2d7c933 100755 --- a/display_books.inc +++ b/display_books.inc @@ -293,7 +293,7 @@ function _list_of_all_completed_books($category_default_value = NULL, $subcatego $result = db_query("SELECT COUNT( pe.book ) AS book_count FROM {textbook_companion_preference} pe LEFT JOIN textbook_companion_proposal po ON pe.proposal_id = po.id WHERE po.proposal_status =3 AND pe.approval_status =1"); $row = $result->fetchObject(); $book_count = $row->book_count; - $i = 1; + $i = $result->rowCount(); /* get preference */ if ($category_default_value <= 0 && $subcategory_default_value == NULL) { @@ -345,7 +345,7 @@ function _list_of_all_completed_books($category_default_value = NULL, $subcatego $preference_data->university, date("Y", $preference_data->completion_date) ); - $i++; + $i--; } //$proposal_data = $proposal_q->fetchObject() /* check if there are any pending proposals */ if (!$proposal_rows) |