Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in Q:\home\sajt4\www\lib\db_functions.php on line 164
Warning: Cannot modify header information - headers already sent by (output started at Q:\home\sajt4\www\lib\db_functions.php:164) in Q:\home\sajt4\www\admin.php on line 128
case "delete":
$table = $_GET['t'];
$id = $_GET['id'];
delete_data($table, $id);
header("Location: admin.php?view=".$table); /// строка 128
break;
function delete_data($table, $id)
{
mysql_query(" DELETE FROM $table WHERE id='$id' ");
}
/// Функция для помещения результатов выборки в массив
function db_result_to_array($result)
{
$res_array = array();
$count = 0;
while($row = mysql_fetch_array($result)) /// строка 164
{
$res_array[$count] = $row;
$count++;
}
return $res_array;
}