function.php 619 B

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