[studentbooks09] r148 committed - dbretrieval.php - 24 hr clause is removed....

1 view
Skip to first unread message

student...@googlecode.com

unread,
Dec 13, 2010, 2:26:00 AM12/13/10
to student...@googlegroups.com
Revision: 148
Author: nirajsuthar
Date: Sun Dec 12 23:25:12 2010
Log: dbretrieval.php - 24 hr clause is removed.

Niraj
http://code.google.com/p/studentbooks09/source/detail?r=148

Modified:
/trunk/Geekzbookshelf2/data/dbRetrieval.php

=======================================
--- /trunk/Geekzbookshelf2/data/dbRetrieval.php Sun Dec 12 18:53:01 2010
+++ /trunk/Geekzbookshelf2/data/dbRetrieval.php Sun Dec 12 23:25:12 2010
@@ -170,7 +170,7 @@
function getReviewofaBOOK($bookID){
openmydb();
/*We need 24 hrs to double check the review posted by the customer at
backend only those reviews will be shown*/
- $qry = "SELECT * FROM `Review` WHERE BookID = $bookID And `DatePosted`
<= Date_Sub(Now(), Interval 1 Day) Order By ReviewID Desc";
+ $qry = "SELECT * FROM `Review` WHERE BookID = $bookID Order By
ReviewID Desc";
$result = mysql_query($qry);
return $result;

@@ -182,7 +182,7 @@
openmydb();
$sql = "Select `BookID`, Count(`Rating`) As Rating\n"
. "From Review\n"
- . "Where `Rating`= 5 And `DatePosted` <= Date_Sub(Now(), Interval 1
Day)\n"
+ . "Where `Rating`= 5 \n"
. "Group By `BookID`\n"
. "Having `BookID`= $bookID";
$result = mysql_query($sql);
@@ -193,7 +193,7 @@
openmydb();
$sql = "Select `BookID`, Count(`Rating`) As Rating\n"
. "From Review\n"
- . "Where `Rating`= 4 And `DatePosted` <= Date_Sub(Now(), Interval 1
Day)\n"
+ . "Where `Rating`= 4 \n"
. "Group By `BookID`\n"
. "Having `BookID`= $bookID";
$result = mysql_query($sql);
@@ -204,7 +204,7 @@
openmydb();
$sql = "Select `BookID`, Count(`Rating`) As Rating\n"
. "From Review\n"
- . "Where `Rating`= 3 And `DatePosted` <= Date_Sub(Now(), Interval 1
Day)\n"
+ . "Where `Rating`= 3 \n"
. "Group By `BookID`\n"
. "Having `BookID`= $bookID";
$result = mysql_query($sql);
@@ -215,7 +215,7 @@
openmydb();
$sql = "Select `BookID`, Count(`Rating`) As Rating\n"
. "From Review\n"
- . "Where `Rating`= 2 And `DatePosted` <= Date_Sub(Now(), Interval 1
Day)\n"
+ . "Where `Rating`= 2 \n"
. "Group By `BookID`\n"
. "Having `BookID`= $bookID";
$result = mysql_query($sql);
@@ -226,7 +226,7 @@
openmydb();
$sql = "Select `BookID`, Count(`Rating`) As Rating\n"
. "From Review\n"
- . "Where `Rating`= 1 And `DatePosted` <= Date_Sub(Now(), Interval 1
Day)\n"
+ . "Where `Rating`= 1 \n"
. "Group By `BookID`\n"
. "Having `BookID`= $bookID";
$result = mysql_query($sql);
@@ -238,7 +238,7 @@
openmydb();

$sql = "Select Count(Rating) As TotalReview From Review\n"
- . " Where `DatePosted` <= Date_Sub(Now(), Interval 1 Day) Group By
BookID\n"
+ . " Group By BookID\n"
. "Having BookID = $bookID ";
$result = mysql_query($sql);
return $result;
@@ -249,7 +249,7 @@
openmydb();

$sql = "Select Floor(Avg(Rating)) As Avg From Review \n"
- . "Where BookID = $bookID And `DatePosted` <= Date_Sub(Now(),
Interval 1 Day)";
+ . "Where BookID = $bookID ";
$result = mysql_query($sql);
return $result;
}
@@ -258,7 +258,7 @@
openmydb();

$sql = "Select Count(Rating) As Totalpeople From Review \n"
- . "Where BookID = $bookID And `DatePosted` <= Date_Sub(Now(),
Interval 1 Day) ";
+ . "Where BookID = $bookID ";
$result = mysql_query($sql);
return $result;
}

Reply all
Reply to author
Forward
0 new messages