本文整理汇总了PHP中sql_db::re_datas方法的典型用法代码示例。如果您正苦于以下问题:PHP sql_db::re_datas方法的具体用法?PHP sql_db::re_datas怎么用?PHP sql_db::re_datas使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sql_db
的用法示例。
在下文中一共展示了sql_db::re_datas方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: explode
$name = explode('_', $_POST['ModuleUrlName']);
for ($i = 0, $len = count($name); $i < $len; $i++) {
if ($i == 0) {
$name[$i] = strtolower($name[$i]);
} else {
$name[$i] = ucfirst(strtolower($name[$i]));
}
}
$_SESSION['ModuleVarName'] = implode('', $name);
$_SESSION['ModuleFileName'] = ucfirst($_SESSION['ModuleVarName']);
$_SESSION['TableName'] = $_POST['TableName'];
$_SESSION['PageNum'] = $_POST['PageNum'];
include_once "../admin/class/sql.inc.php";
$mysql = new sql_db($_SESSION['host'], $_SESSION['user'], $_SESSION['pwd'], $_SESSION['dbname']);
$sql = "show full fields from `" . $_SESSION['TableName'] . "`";
$rs = $mysql->re_datas($sql);
$str = "";
$i = 0;
$type_option = '<option value="">不检查</option>
<option value="mobile">手机</option>
<option value="number">数字</option>
<option value="email">邮箱</option>
<option value="year">年份</option>
<option value="month">月份</option>
<option value="day">日期</option>
<option value="image">有效图片地址</option>
<option value="url">URL地址</option>
<option value="postcode">邮编</option>
<option value="resource">有效HTTP资源</option>
<option value="datatime">日期时间</option>
<option value="idcard">身份证</option>
示例2: strtolower
for ($i = 0, $len = count($name); $i < $len; $i++) {
if ($i == 0) {
$name[$i] = strtolower($name[$i]);
} else {
$name[$i] = ucfirst(strtolower($name[$i]));
}
}
$_SESSION['ModuleVarName'] = implode('', $name);
$_SESSION['ModuleFileName'] = ucfirst($_SESSION['ModuleVarName']);
$_SESSION['TableName'] = $_POST['TableName'];
$_SESSION['PageNum'] = $_POST['PageNum'];
include_once "./class/sql.inc.php";
$mysql = new sql_db($_SESSION['host'], $_SESSION['user'], $_SESSION['pwd'], $_SESSION['dbname']);
$mysql->sql_query("SET NAMES UTF8");
$sql = "show full fields from `" . $_SESSION['TableName'] . "`";
$rs = $mysql->re_datas($sql);
$sql = "show index from `" . $_SESSION['TableName'] . "`";
$showIndex = $mysql->re_datas($sql);
$primaryFieldArr = array();
foreach ($showIndex as $v) {
if ($v['Key_name'] == 'PRIMARY') {
$primaryFieldArr[] = $v['Column_name'];
}
}
if (!empty($primaryFieldArr)) {
$priTd = ' style="display:none;"';
}
$str = "";
$i = 0;
$type_option = '<option value="">不检查</option>
<option value="mobile">手机</option>