summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Froehlich <ted@convey.de>2011-08-06 20:56:38 +0200
committerBernhard Froehlich <ted@convey.de>2011-08-06 20:56:38 +0200
commitc0afd35630115a7e186b912d2404f2c34f1f18b3 (patch)
treeb82949c686795125a5f99d69ac16ed4963964684
parente21571f342cda9dc4b7709287202ed2b33c7be92 (diff)
downloadcacert-devel-c0afd35630115a7e186b912d2404f2c34f1f18b3.tar.gz
cacert-devel-c0afd35630115a7e186b912d2404f2c34f1f18b3.tar.xz
cacert-devel-c0afd35630115a7e186b912d2404f2c34f1f18b3.zip
Qualified columns in some statements
-rw-r--r--includes/wot.inc.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/includes/wot.inc.php b/includes/wot.inc.php
index 68e15d5..ce35ed6 100644
--- a/includes/wot.inc.php
+++ b/includes/wot.inc.php
@@ -14,7 +14,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-*/
+*/
function query_init ($query)
{
@@ -66,25 +66,25 @@
function get_given_assurances ($userid)
{
- $res = query_init ("select * from `notary` where `from`='".intval($userid)."' and `from` != `to` order by `id` asc");
+ $res = query_init ("select * from `notary` where `notary`.`from`='".intval($userid)."' and `notary`.`from` != `to` order by `notary`.`id` asc");
return $res;
}
function get_received_assurances ($userid)
{
- $res = query_init ("select * from `notary` where `to`='".intval($userid)."' and `from` != `to` order by `id` asc ");
+ $res = query_init ("select * from `notary` where `notary`.`to`='".intval($userid)."' and `notary`.`from` != `notary`.`to` order by `notary`.`id` asc ");
return $res;
}
function get_given_assurances_summary ($userid)
{
- $res = query_init ("select count(*) as number,points,awarded,method from notary where `from`='".intval($userid)."' group by points,awarded,method");
+ $res = query_init ("select count(*) as number,points,awarded,method from notary where `notary`.`from`='".intval($userid)."' group by points,awarded,method");
return $res;
}
-
+
function get_received_assurances_summary ($userid)
{
- $res = query_init ("select count(*) as number,points,awarded,method from notary where `to`='".intval($userid)."' group by points,awarded,method");
+ $res = query_init ("select count(*) as number,points,awarded,method from notary where `notary`.`to`='".intval($userid)."' group by points,awarded,method");
return $res;
}
@@ -124,7 +124,7 @@
$awarded = 100;
}
else
- $experience = 0;
+ $experience = 0;
switch ($row['method'])
{
@@ -291,7 +291,7 @@
$res = get_given_assurances(intval($userid));
while($row = mysql_fetch_assoc($res))
{
- $fromuser = get_user (intval($row['to']));
+ $fromuser = get_user (intval($row['to']));
calc_experience ($row,$points,$experience,$sum_experience);
$name = show_user_link ($fromuser['fname']." ".$fromuser['lname'],intval($row['to']));
output_assurances_row (intval($row['id']),$row['date'],$name,intval($row['awarded']),$row['location'],$row['method']==""?"":_(sprintf("%s", $row['method'])),$experience);