Using ZF 0.2.0 and PDO MySQL, I run into a peculiar case:

$sql = $db->quote('SELECT * FROM <table> ORDER BY date DESC LIMIT 10');
$result = $db->query($sql);
$rows = $result->fetchAll();

returns 0 rows.

using the select object doing the same thing:

$select->from('<table>', '*');
$select->order('date DESC');
$select->limit(10);
$rows= $db->fetchAll($select);

returns up to 10 rows...

These should be the same queries, so why the difference in return?


David

Reply via email to