to fetch the K2 items from 3 categories and ONLY the "published" onesBut it doesn't work!!!What am I doing wrong?"> WHERE statement question - Forums

Forums

WHERE statement question

globerotter 15 Apr, 2015
Answer
Hi,

I'm building a simple Booking Request form and I want to populate a dropdown list with K2 Items (actually the 'title' of the item)

K2 items belong to various K2 categories so I use the DB Read action and in Conditions entered the code below:

<?php return array('published'=>'1', ":catid='32' OR catid='55' OR catid='71' OR catid='76'"); ?>

to fetch the K2 items from 3 categories and ONLY the "published" ones

But it doesn't work!!!

What am I doing wrong?
Max_admin 15 Apr, 2015
1 Likes
You better use this:

<?php
return array('published' => '1', "catid" => array(32, 55, 71, 76));
?>


Regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
globerotter 15 Apr, 2015
Yes!!! It worked fine

Thanks for your fast answer
This topic is locked and no more replies can be posted.