当前位置: 首页>>代码示例>>PHP>>正文


PHP mysqli::fetchRow方法代码示例

本文整理汇总了PHP中mysqli::fetchRow方法的典型用法代码示例。如果您正苦于以下问题:PHP mysqli::fetchRow方法的具体用法?PHP mysqli::fetchRow怎么用?PHP mysqli::fetchRow使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在mysqli的用法示例。


在下文中一共展示了mysqli::fetchRow方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _joinPath

 /**
  * Join dir name and file name and return full path
  *
  * @param  string  $dir
  * @param  string  $name
  * @return string
  * @author Dmitry (dio) Levashov
  **/
 protected function _joinPath($dir, $name)
 {
     $sql = 'SELECT `file_id` FROM ' . $this->tbf . ' WHERE parent_id="' . $dir . '" AND name=' . $this->db->quoteString($name);
     if (($res = $this->query($sql)) && $this->db->getRowsNum($res) > 0) {
         $r = $this->db->fetchRow($res);
         return $r[0];
     }
     return -1;
 }
开发者ID:nao-pon,项目名称:xelfinder,代码行数:17,代码来源:driver.class.php

示例2: checkHomeDir

	protected function checkHomeDir() {
		if ($this->x_isAdmin) {
			if ($this->options['use_group_dir']) {
				$group_parent = $this->root;
				if ($this->options['group_dir_parent']) {
					$sql = 'SELECT file_id FROM '.$this->tbf.' WHERE home_of = ' . $this->groupHomeId . ' LIMIT 1';
					if (($res = $this->query($sql)) && $this->db->getRowsNum($res)) {
						list($group_parent) = $this->db->fetchRow($res);
					} else {
						$this->make($this->root, $this->options['group_dir_parent'], 'directory', $this->groupHomeId);
						$group_parent = $this->db->getInsertId();
					}
				}

				if ($group_parent) {
					$xoopsMenber =& xoops_gethandler('member');
					$groups = $xoopsMenber->getGroupList(new Criteria('group_type' , 'Anonymous', '!='));
					$sql = 'SELECT gid FROM '.$this->tbf.' WHERE home_of < 0';
					if (($res = $this->query($sql)) && $this->db->getRowsNum($res)) {
						while ($row = $this->db->fetchRow($res)) {
							unset($groups[$row[0]]);
						}
					}
					if ($groups) {
						foreach($groups as $gid => $gname) {
							$gid *= -1;
							$this->makeUmask = $this->options['group_dir_umask'];
							$this->makePerm = $this->options['group_dir_perm'];
							$this->make($group_parent, $gname, 'directory', $gid);
						}
					}
				}
			}

			if ($this->options['use_guest_dir']) {
				$sql = 'SELECT file_id FROM '.$this->tbf.' WHERE home_of = 0 LIMIT 1';
				if (($res = $this->query($sql)) && $this->db->getRowsNum($res) < 1) {
					$config_handler =& xoops_gethandler('config');
					$xoopsConfig =& $config_handler->getConfigsByCat(XOOPS_CONF);
					$this->makeUmask = $this->options['guest_dir_umask'];
					$this->makePerm = $this->options['guest_dir_perm'];
					$this->make(1, $this->strToUTF8($xoopsConfig['anonymous']), 'directory', 0);
				}
			}
		}

		if ($this->x_uid && $this->options['use_users_dir']) {
			$sql = 'SELECT file_id FROM '.$this->tbf.' WHERE home_of = '.$this->x_uid .' LIMIT 1';
			if (($res = $this->query($sql)) && $this->db->getRowsNum($res) < 1) {
				$this->makeUmask = $this->options['users_dir_umask'];
				$this->makePerm = $this->options['users_dir_perm'];
				$this->make(1, $this->x_uname, 'directory', $this->x_uid);
			}
		}
	}
开发者ID:nunoluciano,项目名称:uxcl,代码行数:55,代码来源:driver.class.php


注:本文中的mysqli::fetchRow方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。