json - Needs data equal to session variable from data table -


in code want show data table col res_id equals session variable show nothing, code use json.

this code part of crud ajax, need $query results per session variable.

<?php session_start();  $rind = $_session['work']; /*echo "<script type='text/javascript'>alert(<?php echo $rind; ??>);</script>"; */ include('db.php'); include('function.php');  $query = ''; $output = array(); $query .= "select * reguser res_id = $rind "; if(isset($_post["search"]["value"])) {   $query .= 'where name "%'.$_post["search"]["value"].'%" ';  $query .= 'or email "%'.$_post["search"]["value"].'%" ';  $query .= 'or phone "%' .$_post["search"]["value"].'%" ';  $query .= 'or mac "%' .$_post["search"]["value"].'%" '; } if(isset($_post["order"])) {  $query .= 'order '.$_post['order']['0']['column'].' '.$_post['order']['0']['dir'].' '; } 


Comments

Popular posts from this blog

Sort a complex associative array in PHP -

vb.net - How to ignore if a cell is empty nothing -

recursion - Can every recursive algorithm be improved with dynamic programming? -