本文整理汇总了PHP中GridConnector::insert方法的典型用法代码示例。如果您正苦于以下问题:PHP GridConnector::insert方法的具体用法?PHP GridConnector::insert怎么用?PHP GridConnector::insert使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GridConnector
的用法示例。
在下文中一共展示了GridConnector::insert方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: GridConnector
<?php
require_once '../../../codebase/grid_connector.php';
require_once '../../config.php';
$res = mysql_connect($mysql_server, $mysql_user, $mysql_pass);
mysql_select_db($mysql_db);
$grid = new GridConnector($res);
$grid->enable_log("sql.log");
$grid->configure("grid50000", "item_id", "item_nm,item_cd");
$sql = $grid->sql;
echo $id = $grid->insert(array("item_nm" => "1", "item_cd" => Null));
echo "<hr>";
$sql->query("SELECT * FROM grid50000 WHERE item_id=" . $id);
print_r($sql->get_next());
echo "<hr>";
echo $grid->update(array("item_id" => $id, "item_nm" => "2"));
echo "<hr>";
$sql->query("SELECT * FROM grid50000 WHERE item_id=" . $id);
print_r($sql->get_next());
echo "<hr>";
echo $grid->delete($id);
echo "<hr>";
$sql->query("SELECT * FROM grid50000 WHERE item_id=" . $id);
print_r($sql->get_next() == Null);