Well, I have this ajax code that will return the result from MySql in the Success block.
$.ajax({ type:"POST", url:"index.php", success: function(data){ alert(data); } });
My request
$sql = "SELECT * FROM tablename"; $rs=parent::_executeQuery($sql); $rs=parent::getAll($rs); print_r($rs); return $rs
My array of answers in AJAX success warning
Array ( [0] => Array ( [section_id] => 5 [version] => 1 [section_name] => Crop Details [id] => 5 [document_name] => Site Survey [document_master_id] => 1 [document_section_id] => 5 ) [1] => Array ( [section_id] => 28 [version] => 1 [section_name] => Vegetative Report [id] => 6 [document_name] => Site Survey [document_master_id] => 1 [document_section_id] => 28 ) )
I want to get only the result of section_name and document_name so that I can add these two values ββto my list.
source share