My code:
$mdb2 =& MDB2::connect($dsn);
if (PEAR::isError($mdb2)) {
die($mdb2->getMessage());
}
$data = array('now()', 'title1', 'content1');
$types = array('Timestamp', 'text', 'text');
$sth = $mdb2->prepare('INSERT INTO tb1 (time_t, string_t, text_t) VALUES (?, ?, ?)', $types, MDB2_PREPARE_MANIP);
$affectedRows = $sth->execute($data);
echo "ok!";
I get the following problem:
print ok! ,but the table tb1 has nothing. the data didn't inserted
BTW:I have already install mdb2_driver_mysql and run code well like
$res =& $mdb2->query('SELECT * FROM tb2');
$row = $res->fetchOne(1,0);