[php]public function get_on_checkbox1($i,$block,$block){
$button_id="";
if(isset($_POST[$block][$i])){
$block = (isset($_POST[$block]))? 1: 0 ;
}
$button_id = $_POST[$block][$i];
$q=$this->query("UPDATE schools set block ='$block' WHERE sch_id = $bbutton_id ");
}
[/php]
the above code is working perfectly what i want but the problem is i have unlimited number of rows and i want to change the value of the row by sch_id but this code is not doing that if i remove the code WHere sch_id = $button_id it works but change the values of all lines not the checked lines but when i put this line in the code where sch_id = $button_id and press submit button
SQl syntax error please see the manual that correspond with the current vision of SQL showed up need any suggestion