function.php 597 B

1234567891011121314151617181920212223
  1. <?php
  2. function update_historay($sent_id,$user_id,$text,$landmark){
  3. # 更新historay
  4. PDO_Connect("sqlite:"._FILE_DB_USER_SENTENCE_HISTORAY_);
  5. $query = "INSERT INTO sent_historay (sent_id, user_id, text, date, landmark) VALUES (? , ? , ? , ? , ? )";
  6. $stmt = PDO_Execute($query,
  7. array($sent_id,
  8. $user_id,
  9. $text ,
  10. mTime(),
  11. $landmark
  12. ));
  13. if (!$stmt || ($stmt && $stmt->errorCode() != 0)) {
  14. /* 识别错误 */
  15. $error = PDO_ErrorInfo();
  16. return $error[2];
  17. }
  18. else{
  19. #没错误
  20. return "";
  21. }
  22. }
  23. ?>