Forums

Empty table

Popkorn 17 Jun, 2014
Hey guys
how I can show the ccv table without results? And when i click the search button show the data?
Thanks for all
GreyHead 17 Jun, 2014
Hi PopKorn,

You set the WHERE setting to show the empty list if there is no search set. Essentially you want to check for your search value and, if that isn't set make the WHERE clause return no records by setting it to say WHERE 1 = 2

Bob
Popkorn 17 Jun, 2014
Hi bob.
Thanks for this fast reply
I have this in WHERE SQL

<?php
$title = JRequest::getString('title', '', 'post');
$pepito= JRequest::getString('otro', '', 'post');
$nom= JRequest::getString('nom', '', 'post');
$fecha= JRequest::getString('fecha', '', 'post');
$esta= JRequest::getString('esta', '', 'post');
if ( $pepito ) {
echo " `cf_objeto` LIKE '%$title%' and `cf_tienda` LIKE '%$pepito%' and `cf_fecha` LIKE '%$fecha%' and `cf_nombre` LIKE '%$nom%' and `input_checkbox_group_11` LIKE '%$esta%'    ";
}
?>

Can you show me how i do this?Today I can not get anything to work
Thanks
GreyHead 17 Jun, 2014
Answer
1 Likes
Hi Popkorn,

. . .
if ( $pepito ) {
  echo " `cf_objeto` LIKE '%$title%' and `cf_tienda` LIKE '%$pepito%' and `cf_fecha` LIKE '%$fecha%' and `cf_nombre` LIKE '%$nom%' and `input_checkbox_group_11` LIKE '%$esta%'    ";
} else {
  echo ' 1 = 2 ';
}
Popkorn 17 Jun, 2014
Thaaaaaaaaaaaaaaaaanks for all bob😀:D
This topic is locked and no more replies can be posted.