-1
不確定這裏有什麼問題,但我無法使用下面的插入操作。PDO插入語句無法插入db
$dbhost = "localhost";
$dbname = "database";
$dbusername = "root";
$dbpassword = "root";
$link = new PDO("mysql:host=$dbhost;dbname=$dbname",$dbusername,$dbpassword);
$statement = $link->prepare("INSERT INTO bloke(question, dte)
VALUES(:q, :d,)");
$statement->execute(array(
"q" => "Bob",
"d" => "19/12/2014"
));
不工作仍然.. – X10nD 2014-10-30 12:09:43
' print_r($ statement-> errorInfo());'顯示此語句的結果請在'$ statement-> execute()'方法下執行 – gvgvgvijayan 2014-10-30 12:13:19
Array([0] => 01000 [1] => 1265 [2] =>第1行的列'dte'被截斷的數據) – X10nD 2014-10-30 12:14:33