0 Replies Latest reply: Nov 22, 2012 1:42 AM by SamuelXiot RSS

    Cannel Disconnected by "->toString()"

    SamuelXiot Community Member

      I am using to following php script

       

      public function createWaitinglist_user($item) {

       

      $stmt = mysqli_prepare($this->connection, "INSERT INTO $this->tablename (user_idUser, waitinglistUser_status, waitinglistUser_applydata, waitinglistUser_applyProductType) VALUES (?, ?, ?, ?)");
      $this->throwExceptionOnError();

       

      mysqli_stmt_bind_param($stmt, 'iisi', $item->user_idUser, $item->waitinglistUser_status, $item->waitinglistUser_applydata->toString('YYYY-MM-dd HH:mm:ss'), $item->waitinglistUser_applyProductType);
      $this->throwExceptionOnError();

       

      mysqli_stmt_execute($stmt);
      $this->throwExceptionOnError();

       

      $autoid = mysqli_stmt_insert_id($stmt);

       

      mysqli_stmt_free_result($stmt);
      mysqli_close($this->connection);

       

      return $autoid;
      }

       

      but every time the php script run to "->toString('YYYY-MM-dd HH:mm:ss')" the cannel disconnect.

       

      Any quick fix I can used?