本文整理汇总了PHP中getRows函数的典型用法代码示例。如果您正苦于以下问题:PHP getRows函数的具体用法?PHP getRows怎么用?PHP getRows使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getRows函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: duplicate_po_ed
function duplicate_po_ed($personnel)
{
$sql = "select count(*) as dup from po_ed where personcd='{$personnel}'";
$rs = execSelect($sql);
$row = getRows($rs);
$dup = $row['dup'];
return $dup;
}
开发者ID:MUN06,项目名称:Lok-Sabha-Election-16th,代码行数:8,代码来源:form_12_fun.php
示例2: lisr_user_id
function lisr_user_id()
{
$sql = "select count(*) as c_user from user where user_id='{$userid}'";
$rs = execSelect($sql);
$row = getRows($rs);
$c_user = $row['c_user'];
return $c_user;
}
开发者ID:MUN06,项目名称:Lok-Sabha-Election-16th,代码行数:8,代码来源:user_fun.php
示例3: chk_trainingvenue
function chk_trainingvenue($venue_cd)
{
$sql = "Select count(*) as total From second_training WHERE second_training.training_venue='{$venue_cd}'";
$rs = execSelect($sql);
$row = getRows($rs);
$total = $row['total'];
unset($sql, $rs, $row);
return $total;
}
开发者ID:MUN06,项目名称:Lok-Sabha-Election-16th,代码行数:9,代码来源:training2_fun.php
示例4: jmd_admin_js
function jmd_admin_js()
{
global $event;
if ($rs = getRows('select name, js from ' . safe_pfx('txp_js'))) {
foreach ($rs as $row) {
if ($row['name'] === 'default' || $row['name'] === $event) {
$out[] = base64_decode($row['js']);
}
}
echo tag(join("\n", $out), 'script', ' type="text/javascript"');
}
}
开发者ID:jmdeldin,项目名称:jmd_admin_js,代码行数:12,代码来源:admin_js.php
示例5: check_tables
function check_tables($tables, $type = 'FAST', $warnings = 0)
{
$msgs = array();
foreach ($tables as $table) {
$rs = getRows("CHECK TABLE {$table} {$type}");
if ($rs) {
foreach ($rs as $r) {
if ($r['Msg_type'] != 'status' and ($warnings or $r['Msg_type'] != 'warning')) {
$msgs[] = $table . cs . $r['Msg_type'] . cs . $r['Msg_text'];
}
}
}
}
return $msgs;
}
开发者ID:bgarrels,项目名称:textpattern,代码行数:15,代码来源:txp_diag.php
示例6: fatch_Random_personnel_for_replacement
function fatch_Random_personnel_for_replacement($forpc, $assembly, $posting_status, $gender)
{
$sqlc = "select count(*) as cnt\r\n\tFrom personnela Inner Join office On personnela.officecd = office.officecd \r\n \tInner Join policestation On office.policestn_cd = policestation.policestationcd\r\n \tInner Join subdivision On office.subdivisioncd = subdivision.subdivisioncd\r\n \tInner Join poststat On personnela.poststat = poststat.post_stat\r\n \tInner Join assembly As ass_pre On personnela.assembly_temp = ass_pre.assemblycd\r\n \tInner Join assembly ass_per On personnela.assembly_perm = ass_per.assemblycd \r\n \tInner Join assembly ass_ofc On personnela.assembly_off = ass_ofc.assemblycd\r\n \tInner Join district On district.districtcd = subdivision.districtcd \r\n\tLeft Join termination On personnela.personcd = termination.personal_id";
$sqlc .= " WHERE termination.personal_id is null and personnela.gender='{$gender}' and personnela.assembly_temp<>'{$assembly}' and personnela.assembly_perm<>'{$assembly}' and personnela.assembly_off<>'{$assembly}' and personnela.poststat='{$posting_status}' ";
$sqlc .= " and (personnela.booked='' or personnela.booked is null) and personnela.forpc='{$forpc}'";
$rsc = execSelect($sqlc);
$rowc = getRows($rsc);
$limit = $rowc['cnt'];
//echo $limit; exit;
$random_no = rand(0, $limit - 1);
$sql = "Select personnela.personcd,personnela.officecd,personnela.officer_name,personnela.off_desg,office.address1,\r\n \toffice.address2,office.postoffice,policestation.policestation,subdivision.subdivision,district.district,\r\n office.pin,DATE_FORMAT(personnela.dateofbirth,'%d-%m-%Y') as dateofbirth,personnela.gender,personnela.epic,\r\n \tpoststat.poststatus,personnela.present_addr1,personnela.present_addr2,ass_pre.assemblyname As pre_ass,\r\n \tass_per.assemblyname As per_ass,ass_ofc.assemblyname As post_ass\r\n\tFrom personnela Inner Join office On personnela.officecd = office.officecd\r\n \tInner Join policestation On office.policestn_cd = policestation.policestationcd \r\n \tInner Join subdivision On office.subdivisioncd = subdivision.subdivisioncd\r\n \tInner Join poststat On personnela.poststat = poststat.post_stat\r\n \tInner Join assembly As ass_pre On personnela.assembly_temp = ass_pre.assemblycd \r\n \tInner Join assembly ass_per On personnela.assembly_perm = ass_per.assemblycd\r\n \tInner Join assembly ass_ofc On personnela.assembly_off = ass_ofc.assemblycd\r\n \tInner Join district On district.districtcd = subdivision.districtcd\r\n\tLeft Join termination On personnela.personcd = termination.personal_id ";
$sql .= " WHERE termination.personal_id is null and personnela.gender='{$gender}' and personnela.assembly_temp<>'{$assembly}' and personnela.assembly_perm<>'{$assembly}' and personnela.assembly_off<>'{$assembly}' and personnela.poststat='{$posting_status}' ";
$sql .= " and (personnela.booked='' or personnela.booked is null) and personnela.forpc='{$forpc}'";
$sql .= " limit 1 offset {$random_no}";
$rs = execSelect($sql);
connection_close();
return $rs;
}
开发者ID:MUN06,项目名称:Lok-Sabha-Election-16th,代码行数:18,代码来源:reserve-fun.php
示例7: amplifyCell
function amplifyCell(&$record, $dummy = NULL)
{
switch ($record['realm']) {
case 'object':
$record['ports'] = getObjectPortsAndLinks($record['id']);
$record['ipv4'] = getObjectIPv4Allocations($record['id']);
$record['ipv6'] = getObjectIPv6Allocations($record['id']);
$record['nat4'] = getNATv4ForObject($record['id']);
$record['files'] = getFilesOfEntity($record['realm'], $record['id']);
break;
case 'file':
$record['links'] = getFileLinks($record['id']);
break;
case 'location':
$record['locations'] = getLocations($record['id']);
$record['rows'] = getRows($record['id']);
break;
case 'row':
$record['racks'] = getRacks($record['id']);
case 'rack':
$record['mountedObjects'] = array();
// start with default rackspace
for ($i = $record['height']; $i > 0; $i--) {
for ($locidx = 0; $locidx < 3; $locidx++) {
$record[$i][$locidx]['state'] = 'F';
}
}
// load difference
$query = "select unit_no, atom, state, object_id " . "from RackSpace where rack_id = ? and " . "unit_no between 1 and ? order by unit_no";
$result = usePreparedSelectBlade($query, array($record['id'], $record['height']));
global $loclist;
$mounted_objects = array();
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
$record[$row['unit_no']][$loclist[$row['atom']]]['state'] = $row['state'];
$record[$row['unit_no']][$loclist[$row['atom']]]['object_id'] = $row['object_id'];
if ($row['state'] == 'T' and $row['object_id'] != NULL) {
$mounted_objects[$row['object_id']] = TRUE;
}
}
$record['mountedObjects'] = array_keys($mounted_objects);
unset($result);
break;
case 'vst':
$record['rules'] = array();
$record['switches'] = array();
$result = usePreparedSelectBlade('SELECT rule_no, port_pcre, port_role, wrt_vlans, description ' . 'FROM VLANSTRule WHERE vst_id = ? ORDER BY rule_no', array($record['id']));
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
$record['rules'][$row['rule_no']] = $row;
}
unset($result);
$result = usePreparedSelectBlade('SELECT object_id, domain_id FROM VLANSwitch WHERE template_id = ?', array($record['id']));
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
$record['switches'][$row['object_id']] = $row;
}
break;
default:
}
}
开发者ID:rhysm,项目名称:racktables,代码行数:58,代码来源:database.php
示例8: basename
?>
" class="open_close" id="close_in"><i class="icon_set_1_icon-77"></i></a>
<ul>
<li <?php
echo basename($_SERVER['PHP_SELF']) == 'index.php' ? ' class="active"' : '';
?>
class="submenu">
<a href="<?php
echo site_url('');
?>
" class="show-submenu">Home</a>
</li> <li class="submenu">
<a href="javascript:void(0);" class="show-submenu">Tours Packages <i class="icon-down-open-mini"></i></a>
<?php
$category_where = array('is_deleted' => 'N', 'is_active' => 'Y');
$category_rows_data = getRows(DB_TABLE_PREFIX . 'category', $category_where, "*", 'sort_order');
$category_data = $category_rows_data['data'];
if ($category_rows_data['total_recs'] > 0) {
?>
<ul>
<li<?php
echo basename($_SERVER['PHP_SELF']) == 'all_tours_list.php' ? ' class="active"' : '';
?>
><a href="<?php
echo site_url('');
?>
all_tours_list.php">All tours list</a></li>
<?php
foreach ($category_data as $side_bar_category) {
开发者ID:Khum,项目名称:singaporedeals4u,代码行数:31,代码来源:header.php
示例9: personnel_list
<td colspan="2"> </td>
</tr>
<tr>
<td align="left">Polling Party No:</td>
<td align="left"><input type="text" name="polling_party_no" id="polling_party_no" style="width:142px;" onchange="return personnel_list();" /></td><td colspan="2"> </td>
</tr>
<tr>
<td align="left">Post Status:</td>
<td align="left" colspan="3"><select id="posting_status" name="posting_status" onchange="return personnel_list();" style="width:150px;">
<option value="0">-Select Posting Status-</option>
<?php
$rsP = fatch_postingstatus();
$num_rows = rowCount($rsP);
if ($num_rows > 0) {
for ($i = 1; $i <= $num_rows; $i++) {
$rowP = getRows($rsP);
echo "<option value='{$rowP['0']}'>{$rowP['1']}</option>\n";
}
}
$rsP = null;
$num_rows = 0;
$rowP = null;
?>
</select></td>
</tr>
<tr>
<td align="left"><b>Personnel ID:</b></td>
<td align="left"><span id="personnel_list"><select id="p_id" name="p_id" style="width:150px;" onchange="fatch_personnel_dtl(this.value);"></select>
</span></td>
<td align="left"><b>Office ID:</b></td>
<td align="left" width="60px"><span id="ofc_id"></span></td>
开发者ID:MUN06,项目名称:Lok-Sabha-Election-16th,代码行数:31,代码来源:emp-replacement-reserve.php
示例10: PC_change
<table width="100%">
<tr><input type="hidden" id="hid_subdiv" value="<?php
print $subdiv_cd;
?>
" />
<td align="left">Parliamentary Constituency</td>
<td align="left"><select name="PC" id="PC" style="width:180px;" onchange="return PC_change(this.value);">
<option value="0">-Select PC-</option>
<?php
$districtcd = $dist_cd;
include_once 'function/form_12_fun.php';
$rsPC = fatch_PC_ag_dist($districtcd);
$num_rows = rowCount($rsPC);
if ($num_rows > 0) {
for ($i = 1; $i <= $num_rows; $i++) {
$rowPC = getRows($rsPC);
echo "<option value='{$rowPC['0']}'>{$rowPC['1']}</option>\n";
$rowPC = null;
}
}
$rsPC = null;
$num_rows = 0;
?>
</select>
</td>
<td rowspan="2" width="50px">OR</td>
</tr>
<tr>
<td align="left">Assembly Constituency</td>
<td align="left" id="assembly_result"><select name="assembly" id="assembly" style="width:180px;"></select></td>
</tr>
开发者ID:MUN06,项目名称:Lok-Sabha-Election-16th,代码行数:31,代码来源:second-appointment-letter-reserve.php
示例11: getRows
$rows_data_cat = getRows(DB_TABLE_PREFIX . 'category', $where_cat, '*');
$cat_data = $rows_data_cat['data'];
$category = $cat_data[0];
?>
<div class="short_info"><i class="icon_set_1_icon-4"></i><?php
echo $category['title'];
?>
</div></a>
</div>
</div>
<div class="clearfix visible-xs-block"></div>
<div class="col-lg-6 col-md-6 col-sm-6">
<div class="tour_list_desc">
<?php
$where2 = array('product_id' => $id);
$rows_data2 = getRows(DB_TABLE_PREFIX . 'reviews', $where2, '*');
$product_data2 = $rows_data2['data'];
if ($rows_data2['total_recs'] > 0) {
$total = 0;
foreach ($product_data2 as $product) {
extract($product);
$total_re_overall += $review_overall / 10;
?>
<?php
}
$totalnum = count($product_data2);
$re_overall = $total_re_overall / $totalnum * 100;
?>
开发者ID:Khum,项目名称:SDFU,代码行数:31,代码来源:wishlist.php
示例12: getRows
<?php
if (isset($_GET[newsid]) && !empty($_GET[newsid])) {
require_once "action/checkAamsLogin.php";
require_once "action/smarty_inc.php";
require_once "action/mysql.class.php";
$query = $db->query("select * from news where id = '{$_GET['newsid']}'");
$info = $db->fetch_array($query);
$smarty->assign("newsinfo", $info);
$rows = getRows(" news_type where pid=0 ", $db);
$smarty->assign("typeRows", $rows);
$smarty->display("updatenews.html");
} else {
echo "<script>window.history.back();</script>";
exit;
}
开发者ID:soross,项目名称:myteashop,代码行数:16,代码来源:updatenews.php
示例13: sitemapXML
public function sitemapXML()
{
static $mlp_installed;
if (!isset($mlp_installed)) {
$mlp_installed = is_callable('l10n_installed') ? call_user_func('l10n_installed', true) : false;
}
$out = '<?xml version="1.0" encoding="utf-8"?>';
$out .= '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">';
// Homepage
$out .= $this->urlXML(hu);
// Excluded sections
$excluded = $GLOBALS['prefs']['jmd_sitemap_exclude'];
$excluded = unserialize($excluded);
foreach ($excluded as $key => $value) {
$notIn[$key] = "'{$value}'";
}
$notIn = implode(',', $notIn);
$notIn .= ",'default'";
// List sections
$site_langs = array();
if ($mlp_installed) {
$site_langs = MLPLanguageHandler::get_site_langs();
}
$sections = safe_column("name", "txp_section", "name not in({$notIn})");
foreach ($sections as $section) {
if ($mlp_installed) {
foreach ($site_langs as $lang) {
$lang = substr($lang, 0, 2) . '/';
$loc = hu . $lang . urlencode($section) . '/';
$out .= $this->urlXML($loc);
}
} else {
$loc = pagelinkurl(array('s' => $section));
$out .= $this->urlXML($loc);
}
}
// Articles
$fields = 'ID as thisid, Section as section, Title as title,
url_title, unix_timestamp(Posted) as posted,
unix_timestamp(LastMod) as lastmod';
if ($mlp_installed) {
$fields .= ', l10n_lang';
}
$articles = getRows("select {$fields} from " . safe_pfx('textpattern') . " where Status = 4 and Posted<= now() and section not in({$notIn})");
if ($articles) {
include_once txpath . '/publish/taghandlers.php';
foreach ($articles as $article) {
$loc = permlinkurl($article);
if ($mlp_installed) {
$loc = str_replace(hu, hu . substr($article['l10n_lang'], 0, 2) . '/', $loc);
}
$lastmod = date('c', $article['lastmod']);
$out .= $this->urlXML($loc, $lastmod);
}
}
$out .= '</urlset>';
return $out;
}
开发者ID:netcarver,项目名称:jmd_sitemap_mlp,代码行数:58,代码来源:jmd_sitemap.php
示例14: isSquare
public function isSquare()
{
return getRows() == getCols();
}
开发者ID:katrinaniolet,项目名称:encog-php-core,代码行数:4,代码来源:Matrix.php
示例15: getRows
<?php
function getRows($file)
{
$handle = fopen($file, 'rb');
if ($handle === false) {
throw new Exception();
}
while (feof($handle) === false) {
(yield fgetcsv($handle));
}
fclose($handle);
}
foreach (getRows('data.csv') as $row) {
print_r($row);
}
开发者ID:tonalm,项目名称:modern-php,代码行数:16,代码来源:csv-generator.php
示例16: getThings
function getThings($query, $debug = '')
{
$rs = getRows($query, $debug);
if ($rs) {
foreach ($rs as $a) {
$out[] = array_shift($a);
}
return $out;
}
return array();
}
开发者ID:bgarrels,项目名称:textpattern,代码行数:11,代码来源:txplib_db.php
示例17: pageft
include_once "action/smarty_inc.php";
include_once "action/lang.class.php";
include_once "action/mysql.class.php";
include_once "action/public_info.php";
if ($currlang == "en") {
include_once "action/page.class.en.php";
} else {
include_once "action/page.class.php";
}
$where = " where remark='Honour' and seq is null ";
//分页
$pagesize = 12;
//一页显示多少条
$queryTotal = $db->query("select id from cp " . $where);
$total = $db->db_num_rows();
pageft($total, $pagesize);
if ($firstcount < 0) {
$firstcount = 0;
}
//显示分页的内容
$smarty->assign("page", $pagenav);
//产品
$certRow = getRows("cp " . $where . "order by create_date desc limit {$firstcount}, {$displaypg} ", $db, "id,cp_info_type_" . $currlang . " as cert_name,path");
$smarty->assign("certRows", $certRow);
//联系我们ContactUs
$contactusInfo = getInfo("cp where remark='ContactUs'", $db, "cp_info_value_" . $currlang . " as info");
$smarty->assign("contactUsInfo", html_entity_decode($contactusInfo[info]));
$aboutUsInfoAll = getInfo("cp where remark='AboutUs'", $db, "cp_info_value_" . $currlang . " as info");
$smarty->assign("AboutUsInfoAll", html_entity_decode($aboutUsInfoAll[info]));
$smarty->display("cert.html");
开发者ID:soross,项目名称:myteashop,代码行数:30,代码来源:cert.php
示例18: getRows
<?php
//²Ëµ¥
$menulist = getRows("menu where menu_type='PublicTopNav' order by menu_index", $db, " id,menu_url,menu_name_" . $currlang . " as menu_name ");
$smarty->assign("menulist", $menulist);
//µ×²¿µ¼º½
$nav_buttom_info = getInfo("comm_code where type_name='ButtomNavInfo'", $db, "type_value_" . $currlang . " as type_value");
$smarty->assign("ButtomNavInfo", html_entity_decode($nav_buttom_info[type_value]));
//°æȨÐÅÏ¢
$copy_buttom_info = getInfo("comm_code where type_name='ButtomCopyInfo'", $db, "type_value_" . $currlang . " as type_value");
$smarty->assign("ButtomCopyInfo", html_entity_decode($copy_buttom_info[type_value]));
////modify by 1-8 flashÇл»
$flashPic = getRows("comm_code where type_name='TopFlashImage' order by remark", $db);
$smarty->assign("TopFlashImage", $flashPic);
//ÓïÑÔ
if ($currlang == "en") {
$clang = 'en';
} else {
$clang = '';
}
$smarty->assign("clang", $clang);
$url = $_SERVER["REQUEST_URI"];
$smarty->assign("CURL", $url);
$smarty->assign("lang", $lang[$currlang]['public']);
开发者ID:soross,项目名称:myteashop,代码行数:24,代码来源:public_info.php
示例19: getSubCategory
function getSubCategory($collapse_number, $product_category)
{
global $con;
$sql = "SELECT * FROM category";
$unique_brands = getRows('DISTINCT pro_brand', 'products WHERE pro_category="' . $product_category . '"');
echo '<div class="collapse" id="collapse' . $collapse_number . '">';
getBrand($product_category, $unique_brands);
echo '</div>';
}
开发者ID:Toesmash,项目名称:git-techpoint,代码行数:9,代码来源:functions.php
示例20: safe_insert
if (!safe_field('name', 'txp_prefs', "name = 'doctype'")) {
safe_insert('txp_prefs', "prefs_id = 1, name = 'doctype', val = 'xhtml', type = '0', event = 'publish', html = 'doctypes', position = '190'");
}
// publisher's email address
if (!safe_field('name', 'txp_prefs', "name = 'publisher_email'")) {
safe_insert('txp_prefs', "prefs_id = 1, name = 'publisher_email', val = '', type = 1, event = 'admin', position = 115");
}
// goodbye raw ?php support
if (safe_field('name', 'txp_prefs', "name = 'allow_raw_php_scripting'")) {
safe_delete('txp_prefs', "name = 'allow_raw_php_scripting'");
}
safe_alter('txp_users', "MODIFY RealName VARCHAR(255) NOT NULL default '', MODIFY email VARCHAR(254) NOT NULL default ''");
// Remove any setup strings from lang table
safe_delete('txp_lang', "event='setup'");
$has_idx = 0;
$rs = getRows('show index from `' . PFX . 'textpattern`');
foreach ($rs as $row) {
if ($row['Key_name'] == 'url_title_idx') {
$has_idx = 1;
}
}
if (!$has_idx) {
safe_query('alter ignore table `' . PFX . 'textpattern` add index url_title_idx(`url_title`)');
}
// Remove is_default from txp_section table and make it a preference
if (!safe_field('name', 'txp_prefs', "name = 'default_section'")) {
$current_default_section = safe_field('name', 'txp_section', 'is_default=1');
safe_insert('txp_prefs', "prefs_id = 1, name = 'default_section', val = '" . doSlash($current_default_section) . "', type = '2', event = 'section', html = 'text_input', position = '0'");
}
$cols = getThings('describe `' . PFX . 'txp_section`');
if (in_array('is_default', $cols)) {
开发者ID:balcides,项目名称:Cathartic_server,代码行数:31,代码来源:_to_4.5.0.php
注:本文中的getRows函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论