MySQL bağlama hatası - Bu ne PHP neden olabilir?

0 Cevap

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '?,?' at line 1

Ben bu yüzden MySQL sürümünde (MySQL 4.1.25 ve PHP 5) ile bir ilgisi olmalı tahmin ediyorum önce kodu ile bir sorunu yoktu.

İşte kullanıyorum kodu:

  $sql = "a long sql select statement... ?,?";

  if ($stmt = $mysqli->prepare($sql)) 
    {
        // it never even gets here
        $stmt->bind_param('ii',$offset,$limit);
        ... 
    }
  else
    {   
        echo($mysqli->error);
    }

0 Cevap