function add_new($father,$chName) // add new category
{
if($father = "1") {
$result = mysql_query("INSERT into stinky_menu (title,nest_under)
VALUES('".$chName."','1')");
}
else {
$result = mysql_query("UPDATE stinky_menu SET title = '$chName' nest_under = '$father'");
}
}
我从父页面获取父项的值,但如果它不等于一,则不会返回其他条件。更新声明不起作用
没有忘记你在哪里update语句条款? – 2009-07-18 15:22:38