本文整理匯總了PHP中Install::vxSetupWeight方法的典型用法代碼示例。如果您正苦於以下問題:PHP Install::vxSetupWeight方法的具體用法?PHP Install::vxSetupWeight怎麽用?PHP Install::vxSetupWeight使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Install
的用法示例。
在下文中一共展示了Install::vxSetupWeight方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: time
$board_description = mysql_real_escape_string($board_description);
$board_created = time();
$board_lastupdated = time();
$sql = "INSERT INTO babel_node(nod_name, nod_title, nod_pid, nod_sid, nod_uid, nod_level, nod_header, nod_footer, nod_description, nod_created, nod_lastupdated) VALUES('{$board_name}', '{$board_title}', {$board_pid}, {$board_sid}, {$board_uid}, {$board_level}, '{$board_header}', '{$board_footer}', '{$board_description}', {$board_created}, {$board_lastupdated})";
$sql_exist = "SELECT nod_id FROM babel_node WHERE nod_name = '{$board_name}'";
$rs = mysql_query($sql_exist);
if (mysql_num_rows($rs) > 0) {
$Node = mysql_fetch_object($rs);
mysql_free_result($rs);
$sql_update = "UPDATE babel_node SET nod_title = '{$board_title}', nod_pid = {$board_pid}, nod_sid = {$board_sid}, nod_uid = {$board_uid}, nod_level = {$board_level}, nod_header = '{$board_header}', nod_footer = '{$board_footer}', nod_description = '{$board_description}' WHERE nod_id = {$Node->nod_id}";
mysql_query($sql_update);
if (mysql_affected_rows() == 1) {
echo 'UD: ' . $sql_update . '<br />';
} else {
echo 'EX: ' . $sql_update . '<br />';
}
} else {
mysql_query($sql) or die(mysql_error());
if (mysql_affected_rows() == 1) {
echo 'OK: ' . $sql . '<br />';
} else {
echo 'FD: ' . $sql . '<br />';
}
}
}
}
$i = new Install();
$i->vxSetupWeight();
// You can set up your own world from here:
$i->vxSetupBoard('board', 'Board', 2, 2, 1, 2, 'Hello World!', 'This is an example board in Limbo.');
$i->vxSetupChannelByName('board', 'http://feeds.feedburner.com/livid');