L.s.
I found this piece of code for making a multiple selection from a database within CC3.1 It's from the greyhead book,
and goes in to the where box in cc3
But I dont know how to addapt it for CC5,
Can any body help??
I found this piece of code for making a multiple selection from a database within CC3.1 It's from the greyhead book,
and goes in to the where box in cc3
But I dont know how to addapt it for CC5,
Can any body help??
<?php
// create the empty array
$where = array();
// check the text filter
$filter_text = JRequest::getString('filter_text', '', 'post');
if ( $filter_text ) {
$where[] = "( `title` LIKE '%$filter_text%'
OR `introtext` LIKE '%$filter_text%'
OR `fulltext` LIKE '%$filter_text%' )";
}
// check the catid filter
$filter_catid =& JRequest::getVar('filter_catid', array(), 'post', 'array');
if ( count($filter_catid) ) {
$filter = implode(', ', $filter_catid);
$where[] = " `catid` IN ($filter) ";
}
if ( count($where) ) {
$where = implode(' AND ', $where);
echo " WHERE $where ";
}
?>