1 (edited by kropto 2012-08-23 21:47:23)

Topic: Keletas id paieskai

Reikia surasti irasus pagal ID, ju gali buti keletas pvz 2,14,5,6 ir t.t. kaip i SELECT uzklausa padaryti jog tuos irasus su tais id rastu?

Pabandziau tokia uzklausa tik nzn ar ji teisinga taciau veikia gal yra paprastesnis budas

WHERE (ipb_topics.forum_id=2 OR ipb_topics.forum_id=14 OR ipb_topics.forum_id=13)


'SELECT * FROM ipb_topics LEFT JOIN ipb_posts ON ipb_topics.topic_firstpost=ipb_posts.pid WHERE (ipb_topics.forum_id=2 OR ipb_topics.forum_id=14 OR ipb_topics.forum_id=13) AND ipb_topics.approved=1 ORDER BY ipb_posts.post_date DESC LIMIT 9'

Re: Keletas id paieskai

http://dev.mysql.com/doc/refman/5.0/en/ … unction_in

MongoDB Certified Developer
MongoDB Certified DBA
Zend Certified Engineer