Merge pull request #335 from Shadowss/patch-53

fix addNotice function
This commit is contained in:
yi12345
2013-09-19 11:27:57 -07:00
+7 -7
View File
@@ -1741,13 +1741,13 @@ class MYSQL_DB {
return mysql_query($q, $this->connection);
}
function addNotice($uid, $wref, $aid, $type, $topic, $data, $time = 0) {
if($time == 0) {
$time = time();
}
$q = "INSERT INTO " . TB_PREFIX . "ndata (id, uid, toWref, ally, topic, ntype, data, time, viewed) values (0,'$uid','$wref','$aid','$topic',$type,'$data',$time,0)";
return mysql_query($q, $this->connection) or die(mysql_error());
}
function addNotice($uid, $toWref, $ally, $type, $topic, $data, $time = 0) {
if($time == 0) {
$time = time();
}
$q = "INSERT INTO " . TB_PREFIX . "ndata (id, uid, toWref, ally, topic, ntype, data, time, viewed) values (0,'$uid','$toWref','$ally','$topic',$type,'$data',$time,0)";
return mysql_query($q, $this->connection) or die(mysql_error());
}
function getNotice($uid) {
$q = "SELECT * FROM " . TB_PREFIX . "ndata where uid = $uid and del = 0 ORDER BY time DESC";