當前位置: 首頁>>代碼示例>>PHP>>正文


PHP cls_mysql::fetch_row方法代碼示例

本文整理匯總了PHP中cls_mysql::fetch_row方法的典型用法代碼示例。如果您正苦於以下問題:PHP cls_mysql::fetch_row方法的具體用法?PHP cls_mysql::fetch_row怎麽用?PHP cls_mysql::fetch_row使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在cls_mysql的用法示例。


在下文中一共展示了cls_mysql::fetch_row方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: lang

     $dbsource['cname'] = lang('current_system');
     $dbsource['dbname'] = $dbname;
 } else {
     $dbsource = $dbsources[$dsid];
     $dbsource['dbpw'] && ($dbsource['dbpw'] = authcode($dbsource['dbpw'], 'DECODE', md5($authkey)));
     if (empty($dbsource['cname']) || empty($dbsource['dbhost']) || empty($dbsource['dbuser']) || empty($dbsource['dbname'])) {
         amessage('dbdatamis');
     }
     $ndb = new cls_mysql();
     if (!$ndb->connect($dbsource['dbhost'], $dbsource['dbuser'], $dbsource['dbpw'], $dbsource['dbname'], 0, false, $dbsource['dbcharset'])) {
         amessage('dbconerr');
     }
 }
 $dbtables = array('' => lang('select_table'));
 $query = $ndb->query("SHOW TABLES FROM {$dbsource['dbname']}");
 while ($v = $ndb->fetch_row($query)) {
     $dbtables[$v[0]] = $v[0];
 }
 $dsidsarr = array(0 => lang('current_system'));
 foreach ($dbsources as $k => $v) {
     $dsidsarr[$k] = $v['cname'];
 }
 $filterbox = lang('choose_db_src') . '  :  ';
 $filterbox .= "<select style=\"vertical-align: middle;\" name=\"dsid\" onchange=\"redirect('?entry=dbsources&action=viewconfigs&dsid=' + this.options[this.selectedIndex].value);\">";
 foreach ($dsidsarr as $k => $v) {
     $filterbox .= "<option value=\"{$k}\"" . ($dsid == $k ? ' selected' : '') . ">{$v}</option>";
 }
 $filterbox .= "</select>";
 $filterbox .= '&nbsp; &nbsp; &nbsp; ' . lang('choose_table') . '&nbsp; &nbsp;';
 $filterbox .= "<select style=\"vertical-align: middle;\" name=\"dbtable\" onchange=\"redirect('?entry=dbsources&action=viewconfigs&dsid={$dsid}&dbtable=' + this.options[this.selectedIndex].value);\">";
 foreach ($dbtables as $k => $v) {
開發者ID:polarlight1989,項目名稱:08cms,代碼行數:31,代碼來源:dbsources.inc.php


注:本文中的cls_mysql::fetch_row方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。