EasyUI Forum
October 18, 2025, 06:44:41 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Pass Greater Then / Less Then ?  (Read 7821 times)
tlombard
Newbie
*
Posts: 5


View Profile
« on: December 07, 2013, 12:19:18 PM »

Can someone take a double look, and see why I cannot pass my year FILTEr values over to my PHP page...I think its becuase I;m trying to pass "<, >, =, <="...and that is breaking somehting???

I have two search fields:  Year and Year_Filter

Code:
<input id="year_FIELD" class="easyui-combobox"
        name="year_FIELD" data-options=" data: [
{yearID:'',year:'ALL'},
{yearID:'2013',year:'2013'},
{yearID:'2012',year:'2012'},
{yearID:'2011',year:'2011'},
{yearID:'2010',year:'2010'},
{yearID:'2009',year:'2009'}
],
valueField:'yearID',
textField:'year',
panelHeight:'auto'
        ">

<input id="year_FILTER" class="easyui-combobox"
        name="year_FILTER" data-options=" data: [
{value:'', label:'No Filter'},
{value:'=', label:'Equal'},
{value:'<>', label:'Not Equal'},
{value: '>', label:'Greater Then'},
{value:'<', label:'Less Then'},
{value:'>=', label:'Greater Then OR Equal'}
],
valueField:'value',
textField:'label',
panelHeight:'auto'
        ">


When the search button is clicked...those values are sent the PHP page:

Code:
<script type="text/javascript">
function doSearch(){
$('#tt').datagrid('load',{
                                yearPOST: $('#year_FIELD').combobox('getValue'),
                                yearFilterPOST: $('#year_FILTER').combobox('getValue')
});
}
</script>

My PHP code captures IS NOT CAPTURING THE YEAR_FILTER Value:

Code:
$year_year = isset($_POST['yearPOST']) ? mysql_real_escape_string($_POST['yearPOST']) : '2012';
$year_FILTER = isset($_POST['yearFilter_POST']) ? $_POST['yearFilter_POST'] : '=';

Here is my WHERE statement:

Code:
$where = "year_year $year_FILTER $year_year";
Logged
tlombard
Newbie
*
Posts: 5


View Profile
« Reply #1 on: December 07, 2013, 12:35:03 PM »

as soon as I posted i found the error

my POST variables did not match  Roll Eyes

Code:
yearFilter_POST
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!