summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Tänzer <neo@nhng.de>2013-10-02 00:20:15 +0200
committerMichael Tänzer <neo@nhng.de>2013-10-02 00:20:15 +0200
commit1cbbc32a0b73db83460cf947228bb12ef339ac5a (patch)
tree16b5ad3efb41e5555c16e355414843a7bf7b4b56
parent3db18b07449c645dc51207928a208ad8ff67b91c (diff)
downloadcacert-devel-1cbbc32a0b73db83460cf947228bb12ef339ac5a.tar.gz
cacert-devel-1cbbc32a0b73db83460cf947228bb12ef339ac5a.tar.xz
cacert-devel-1cbbc32a0b73db83460cf947228bb12ef339ac5a.zip
bug 1137: Missing space in SQL querybug-1137
-rw-r--r--includes/notary.inc.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/includes/notary.inc.php b/includes/notary.inc.php
index efcd1de..c983491 100644
--- a/includes/notary.inc.php
+++ b/includes/notary.inc.php
@@ -667,8 +667,8 @@
*/
function get_first_user_agreement($memid, $active=1, $type="CCA"){
//returns an array (`document`,`date`,`method`, `comment`,`active`)
- $query="SELECT u.`document`, u.`date`, u.`method`, u.`comment`, u.`active` FROM `user_agreements` u
- WHERE u.`document` = '" . mysql_real_escape_string($type) . "' AND u.`memid`=" . intval($memid) . "AND u.`active`=" . intval($active) .
+ $query="SELECT u.`document`, u.`date`, u.`method`, u.`comment`, u.`active` FROM `user_agreements` AS u
+ WHERE u.`document` = '" . mysql_real_escape_string($type) . "' AND u.`memid`=" . intval($memid) . " AND u.`active`=" . intval($active) .
" ORDER BY u.`date` Limit 1;";
$res = mysql_query($query);
if(mysql_num_rows($res) >0){