visuddhinanda 3 år sedan
förälder
incheckning
5c93daae94
1 ändrade filer med 2 tillägg och 1 borttagningar
  1. 2 1
      public/app/usent/function.php

+ 2 - 1
public/app/usent/function.php

@@ -118,9 +118,10 @@ class SentPr{
 
 
 	public function setPrData($id,$text){
 	public function setPrData($id,$text){
 		if ($this->dbh_sent) {
 		if ($this->dbh_sent) {
+			#先查询有没有 没有就新建
             $query = "UPDATE "._TABLE_SENTENCE_PR_." set content=? ,modify_time=? , updated_at = now() WHERE id = ? and editor_uid= ? ";
             $query = "UPDATE "._TABLE_SENTENCE_PR_." set content=? ,modify_time=? , updated_at = now() WHERE id = ? and editor_uid= ? ";
             $stmt = $this->dbh_sent->prepare($query);
             $stmt = $this->dbh_sent->prepare($query);
-            $stmt->execute(array($text,mTime(),$id,$_COOKIE["userid"]));
+            $stmt->execute(array($text,mTime(),$id,$_COOKIE["user_uid"]));
             
             
 			if (!$stmt || ($stmt && $stmt->errorCode() != 0)) {
 			if (!$stmt || ($stmt && $stmt->errorCode() != 0)) {
 				/*  识别错误  */
 				/*  识别错误  */