这个查询有什么问题吗?没有任何错误

时间:2016-09-11 07:50:33

标签: php mysql foreach doctrine

我试图弄清楚下一个查询的错误,第一次使用它们。 foreach应显示来自mysql db的一些标题,但它没有显示任何内容。我也没有收到任何错误。

<?php               
$industrey = Doctrine_Query::create()->from("Industry")
           ->select("id, title")
           ->where("title = ? ", 'title')
           ->addWhere("id = ?", 'id')
           ->orderBy("ord ASC")
           ->execute(array());
?>
<div class="block banners blockpromo">
<h2>Industries</h2>
<?php foreach ($industrey as $industry): ?>
<li><?php echo link_to($industry['title'].'<span></span>', '@industry?industry_alias='.$industry['id'], array('title' => $industry['title']));?></li>
<?php endforeach; ?>
</div>

我感谢任何帮助。谢谢。

0 个答案:

没有答案