本文整理汇总了PHP中sqlite_rewind函数的典型用法代码示例。如果您正苦于以下问题:PHP sqlite_rewind函数的具体用法?PHP sqlite_rewind怎么用?PHP sqlite_rewind使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了sqlite_rewind函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: rewind
public function rewind()
{
return sqlite_rewind($this->result);
}
示例2: sqlitem_rewind
function sqlitem_rewind($result)
{
die('sqlitem_rewind not implemented in PDO');
return sqlite_rewind($result);
}
示例3: data_seek
/**
* Se Mueve al resultado indicado por $number en un select
*
* @param int $number
* @param resource $resultQuery
* @return boolean
*/
function data_seek($number, $resultQuery = '')
{
if (!$resultQuery) {
$resultQuery = $this->last_result_query;
if (!$resultQuery) {
return false;
}
}
if (($success = sqlite_rewind($resultQuery, $number)) !== false) {
return $success;
} else {
throw new KumbiaException($this->error());
}
}
示例4: sqlitem_rewind
function sqlitem_rewind($result)
{
return sqlite_rewind($result);
}
示例5: res2arr
/**
* Returns a complete result set as array
*/
function res2arr($res)
{
$data = array();
if ($this->extension == DOKU_EXT_SQLITE) {
if (!sqlite_num_rows($res)) {
return $data;
}
sqlite_rewind($res);
while (($row = sqlite_fetch_array($res, SQLITE_ASSOC)) !== false) {
$data[] = $row;
}
} else {
if (!$res) {
return $data;
}
$data = $res->fetchAll(PDO::FETCH_ASSOC);
}
return $data;
}
示例6: rewind
public function rewind()
{
$lastresult = $this->results[$this->lasthash];
sqlite_rewind($lastresult);
}
示例7: res2arr
/**
* Returns a complete result set as array
*/
function res2arr($res)
{
$data = array();
if (!sqlite_num_rows($res)) {
return $data;
}
sqlite_rewind($res);
while (($row = sqlite_fetch_array($res)) !== false) {
$data[] = $row;
}
return $data;
}
示例8: rewind
/**
* This method actually has no effect, since we do not rewind ResultSet for iteration.
*/
function rewind()
{
sqlite_rewind($this->result);
}
示例9: sqlite_query
/////////////
sqlite_query("CREATE TABLE strings(a VARCHAR)", $db);
foreach ($data as $str) {
sqlite_query("INSERT INTO strings VALUES('{$str}')", $db);
}
$r = sqlite_unbuffered_query("SELECT a from strings", $db);
while (sqlite_valid($r)) {
var_dump(sqlite_current($r, SQLITE_NUM));
sqlite_next($r);
}
$r = sqlite_query("SELECT a from strings", $db);
while (sqlite_valid($r)) {
var_dump(sqlite_current($r, SQLITE_NUM));
sqlite_next($r);
}
sqlite_rewind($r);
while (sqlite_valid($r)) {
var_dump(sqlite_current($r, SQLITE_NUM));
sqlite_next($r);
}
sqlite_exec("DROP TABLE strings", $db);
///////
sqlite_query("CREATE TABLE strings(foo VARCHAR, bar VARCHAR, baz VARCHAR)", $db);
echo "Buffered\n";
$r = sqlite_query("SELECT * from strings", $db);
echo "num fields: " . sqlite_num_fields($r) . "\n";
for ($i = 0; $i < sqlite_num_fields($r); $i++) {
var_dump(sqlite_field_name($r, $i));
}
echo "Unbuffered\n";
$r = sqlite_unbuffered_query("SELECT * from strings", $db, SQLITE_NUM, $errmsg);
示例10: _rewind
protected function _rewind()
{
return @sqlite_rewind($this->_idResult);
}
示例11: rewind
/**
* Rewind the result set
*
* @param resource $res
* @return boolean
*/
public function rewind($res)
{
sqlite_rewind($res);
}
示例12: res2arr
/**
* Returns a complete result set as array
*/
public function res2arr($res, $assoc = true)
{
$data = array();
if (!$res) {
return $data;
}
if (!sqlite_num_rows($res)) {
return $data;
}
sqlite_rewind($res);
$mode = $assoc ? SQLITE_ASSOC : SQLITE_NUM;
while (($row = sqlite_fetch_array($res, $mode)) !== false) {
$data[] = $row;
}
return $data;
}
示例13: db_rewind
function db_rewind($res)
{
sqlite_rewind($res);
}
示例14: rewind
function rewind()
{
//just to abstract from sqlite
sqlite_rewind($this->result);
}
示例15: rewind
public function rewind($result)
{
sqlite_rewind($result);
}