Bonjours,

J'essaye de construire cette requette sous zend.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
 
SELECT topic.tid, topic.title, topic.posts, topic.starter_id, topic.start_date, topic.starter_name, topic.views, topic.topic_rating_total, topic.topic_rating_hits, post.post
FROM ibf_topics AS topic
INNER JOIN ibf_posts AS post ON post.topic_id = topic.tid
AND topic.topic_firstpost = post.pid
WHERE topic.forum_id =39
AND topic.approved =1
ORDER BY topic.start_date DESC
LIMIT 0 , 5
Pour l'instant j'en suis la :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
 
$select = $this->select()
				  ->from(array('topic'=>'ibf_topics'),
					    array('tid', 'title', 'posts', 'starter_id', 'start_date', 'starter_name', 'views', 'topic_rating_total', 'topic_rating_hits'))
			          ->join(array('post'=>'ibf_posts'),
					   array('post'));
$r = $this->fetchAll($select);
Quelqu'un de bienveillant pourrai m'aider a la finir ?

Merci