本文整理汇总了PHP中mysql::getFieldsVal方法的典型用法代码示例。如果您正苦于以下问题:PHP mysql::getFieldsVal方法的具体用法?PHP mysql::getFieldsVal怎么用?PHP mysql::getFieldsVal使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mysql
的用法示例。
在下文中一共展示了mysql::getFieldsVal方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
$ggwd = file_get_contents($datadir . '/' . $gwid . '.php');
$arrayggwd = array();
$arrayggwd = explode("\r\n", $ggwd);
array_shift($arrayggwd);
if ($arrayggwd[2] == '2' && count($arrayyhggfz)) {
$js = 'if("undefined"==typeof NiuXGGed)var NiuXsC=function(d,f,e){var g=new Date;g.setDate(g.getDate()+e);document.cookie=d+"="+f+(null==e?"":";expires="+g.toGMTString())+";path=/"},NiuXrC=function(d){var f=document.cookie;if(0<f.length){var e=f.indexOf(d+"=");if(-1!=e)return e=e+d.length+1,d=f.indexOf(";",e),-1==d&&(d=f.length),parseInt(f.substring(e,d))}return 0},NiuXcC=function(d,f,e){var g=NiuXrC(d);if(g)return NiuXsC(d,g+1,e),g+1;NiuXsC(d,f,e);return f},NiuXGGed="",a=NiuXcC("niuxamsy",1),b=NiuXcC("niuxamsy30",
1,30);if("function"==typeof NiuXcC){var a=NiuXrC("niuxamsy"),b=NiuXrC("niuxamsy30"),i=NiuXcC(ggwid,1);if(a==b&&1<a&&1<i){var c=[' . $yhggfz . '];for(x in c)if(-1==NiuXGGed.indexOf(c[x])&&2>NiuXcC(c[x],1)){opfz+=amsurl+datadir+c[x]+\'"></script>\';NiuXGGed+=c[x];break}}};';
$pattern = '|(/\\*end ggcl\\*/)(.*?)(/\\*begin bjgg\\*/)|is';
$ggwdm = insou1(file_get_contents($datadir . '/' . $gwid . '.js'));
$ggwdm = preg_replace($pattern, '${1}' . "/*begin atyh*/\r\n" . $js . "\r\n/*end atyh*/" . '$3', $ggwdm);
file_put_contents($datadir . '/' . $gwid . '.js', $ggwdm);
} elseif ($arrayggwd[2] == '1' && count($arrayyhggz)) {
$duangwid = substr($gwid, -14, 14);
if ($arrayggwd[3] == '') {
$sql = "SELECT MIN(gww) AS minw FROM {$Pre}niuxams_counter WHERE ac=1 AND gwid='{$duangwid}' AND url NOT LIKE '%previewgg.php?gid=%' AND referer NOT LIKE '%previewgg.php?gid=%'";
$arrayggwd[3] = $conn->getFieldsVal($sql, 'minw');
}
if ($arrayggwd[4] == '') {
$sql = "SELECT MIN(gwh) AS minh FROM {$Pre}niuxams_counter WHERE ac=1 AND gwid='{$duangwid}' AND url NOT LIKE '%previewgg.php?gid=%' AND referer NOT LIKE '%previewgg.php?gid=%'";
$arrayggwd[4] = $conn->getFieldsVal($sql, 'minh');
}
if ($arrayggwd[3] && $arrayggwd[4]) {
$yhggz = '';
foreach ($arrayyhggz as $line) {
$nameoffile = explode('.', $line);
if ($nameoffile[1] <= $arrayggwd[3] * 1.01 && $nameoffile[1] >= $arrayggwd[3] * 0.8 && $nameoffile[2] <= $arrayggwd[4] * 1.01 && $nameoffile[2] >= $arrayggwd[4] * 0.8) {
$yhggz .= '"' . $line . '",';
}
}
$yhggz = rtrim($yhggz, ',');
if ($yhggz) {
示例2: acquery
function acquery()
{
global $Pre;
$gid = substr(insql($_GET['gid']), -14, 14);
$sorc = insql($_GET['sorc']);
$conn = new mysql();
if ($sorc == '1' && is_numeric($gid)) {
$sql = "SELECT COUNT(*) AS NumberOfShows FROM {$Pre}niux_ams_counter where ac=1 and gid='{$gid}' and DATE(time)=CURDATE()";
echo $conn->getFieldsVal($sql, 'NumberOfShows');
} elseif ($sorc == '2' && is_numeric($gid)) {
$sql = "SELECT COUNT(*) AS NumberOfClicks FROM {$Pre}niux_ams_counter where ac=2 and gid='{$gid}' and DATE(time)=CURDATE()";
echo $conn->getFieldsVal($sql, 'NumberOfClicks');
}
}
示例3: insql
<?php
define('NIUXAMS_ACCESS', 'oplog');
require 'common.php';
$desc = insql($_REQUEST['desc']);
$limit = insql($_REQUEST['limit']);
$page = insql($_REQUEST['page']);
$orderby = insql($_REQUEST['orderby']);
$desc = $desc ? '' : 'DESC';
$limit = is_numeric($limit) && $limit > 1 ? $limit : 30;
$page = is_numeric($page) && $page > 1 ? $page : 1;
$orderby = strlen($orderby) > 1 && strlen($orderby) < 12 ? $orderby : 'id';
$conn = new mysql();
$sql = "SELECT COUNT(*) FROM {$Pre}niux_ams_oplog";
$total = $conn->getFieldsVal($sql, 0);
if ($page > ceil($total / $limit)) {
$page = ceil($total / $limit);
}
$kashi = $page * $limit - $limit;
$sql = "SELECT * FROM {$Pre}niux_ams_oplog ORDER BY {$orderby} {$desc} LIMIT {$kashi},{$limit}";
$result = $conn->query($sql);
$list = '';
while ($row = mysql_fetch_array($result)) {
$list .= '<tr class="list">';
$list .= '<td class="ui-widget-content uitd ct">' . $row['id'] . '</td>';
$list .= '<td class="ui-widget-content uitd ct"><span title="' . htmlspecialchars($row['username']) . '">' . cutstr($row['username'], 6) . '</span></td>';
$list .= '<td class="ui-widget-content uitd ct"><span title="' . htmlspecialchars($row['caozuo']) . '">' . cutstr($row['caozuo'], 6) . '</span></td>';
$list .= '<td class="ui-widget-content uitd ct">' . ($row['state'] ? '成功' : '失败') . '</td>';
$list .= '<td class="ui-widget-content uitd ct"><span title="' . htmlspecialchars($row['caozuofile']) . '">' . cutstr($row['caozuofile'], 8) . '</span></td>';
$list .= '<td class="ui-widget-content uitd ct">' . $row['time'] . '</td>';
$list .= '<td class="ui-widget-content uitd ct">' . $row['ip'] . '</td>';
示例4: insql
/* 2.免费使用禁止修改版权信息和官方推广链接.
/* 3.禁止任何衍生版本.
/* ---------------------------------------------------- */
define('NIUXAMS_ACCESS', 'tongji_gglog');
require 'common.php';
$desc = insql($_REQUEST['desc']);
$limit = insql($_REQUEST['limit']);
$page = insql($_REQUEST['page']);
$orderby = insql($_REQUEST['orderby']);
$desc = $desc ? '' : 'DESC';
$limit = is_numeric($limit) && $limit > 1 ? $limit : 30;
$page = is_numeric($page) && $page > 1 ? $page : 1;
$orderby = strlen($orderby) > 1 && strlen($orderby) < 12 ? $orderby : 'id';
$conn = new mysql();
$sql = "SELECT COUNT(*) AS NumberOfRows FROM {$Pre}niux_ams_counter WHERE DATE(time)=CURDATE()";
$total = $conn->getFieldsVal($sql, 'NumberOfRows');
if ($page > ceil($total / $limit)) {
$page = ceil($total / $limit);
}
$kashi = $page * $limit - $limit;
$sql = "SELECT * FROM {$Pre}niux_ams_counter WHERE DATE(time)=CURDATE() ORDER BY {$orderby} {$desc} LIMIT {$kashi},{$limit}";
$result = $conn->query($sql);
$list = '';
while ($row = mysql_fetch_array($result)) {
$list .= '<tr class="list">';
$list .= '<td class="ui-widget-content uitd ct">' . $row['id'] . '</td>';
$list .= '<td class="ui-widget-content uitd ct">' . $row['time'] . '</td>';
$list .= '<td class="ui-widget-content uitd ct">' . (2 == $row['ac'] ? '点击' : '展示') . '</td>';
$list .= '<td class="ui-widget-content uitd ct">' . $row['ip'] . '</td>';
$list .= '<td class="ui-widget-content uitd ct">' . $row['port'] . '</td>';
$list .= '<td class="ui-widget-content uitd ct">' . $row['os'] . '</td>';