function add_new($father = 0 , $chName, $desc , $icon ) // add new category
{
$position = $this->get_position($father);
$sql = "INSERT into ".$this->table_name."(position,c_name,c_desc,c_icon,c_group)
VALUES('','".$chName."','".$desc."','".$icon."','".$this->Group."')";
mysql_query($sql) or die(trigger_error("<br><storng><u>MySQL Error:</u></strong><br>".mysql_error()."<br><br><storng><u>Query Used:</u></strong><br>".$sql."<br><br><storng><u>Info:</u></strong><br>",E_USER_ERROR));
$sql = "UPDATE ".$this->table_name."
SET position = '$father'
WHERE id = '".mysql_insert_id()."'";
mysql_query($sql) or die(trigger_error("<br><storng><u>MySQL Error:</u></strong><br>".mysql_error()."<br><br><storng><u>Query Used:</u></strong><br>".$sql."<br><br><storng><u>Info:</u></strong><br>",E_USER_ERROR));
}
Işleri baba değişken almaz rağmen UPDATE sorgusu yapar Şimdi neden benim soru. Ben olsun onun uygulanamaz emin değilim.