hazırlanan-deyim referans hatası geçmek

2 Cevap php

Ben hata görmüyorum ve kimse onu anlamaya umuyorum:

 public static function createMessage($title, $message, $startDate, $endDate, $author, $status){
      //$dbConn is now a mysqli instance with a connection to the database foobar
      $dbConn = Database::getConnection("foobar");

      $stmt = $dbConn->prepare("INSERT into messages(title, msg, date_start, date_end, app_usersID_FK, date_created, activeflag, msg_status) VALUES (?,?,?,?,?,?,?,?)");

      if(!$stmt){
           throw new Exception("Unable to prepare the statement");
      }

      $dt = date("Y-m-d");
      $stmt->bind_param("ssssisii", $title, $message, $startDate, $endDate, $author, $dt, 1, $status);
      $stmt->execute();

      return true;
 }

Işlev çağrısı

MessageCenter :: CreateMessage ("Hello", "1", "1", "2009/09/12", "2009/09/12" "Sadece merhaba demek için aradım");

Hata iletisi olduğunu:

Ölümcül hata: referans parametre 8 geçmek olamaz