日記
検索条件の指定方法Edit

andで複数条件をつないで指定する際に、わざわざ

$db = $table->getDbAdapter();
$table->fetchAll(array(
$db->quoteInto('foo = ?', $foo),
$db->quoteInto('bar > ?', $bar),
));

みたいな書き方をしていたけど、

$table->fetchAll(array(
'foo = ?' => $foo,
'bar > ?' => $bar,
));

で良かったのか。

Published At2006-06-18 00:00Updated At2006-06-18 00:00