History log of /PHP-5.3/ext/pdo/pdo_stmt.c (Results 201 – 225 of 249)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: php-5.0.3, php-4.3.10, SQLITE_4_3_20041227, php-5.0.3RC2, php-4.3.10RC2, php-5.0.3RC1, php-4.3.10RC1
# dbd71759 28-Oct-2004 Marcus Boerger

- TSRM Fix


# 35b00ffd 27-Oct-2004 Wez Furlong

Synopsis:

PDOStatement::setFetchMode()
reset default fetch() mode for a statement to PDO_FETCH_BOTH

PDOStatement::setFetchMode(PDO_FETCH_NUM)
PDOStatement::setFetchM

Synopsis:

PDOStatement::setFetchMode()
reset default fetch() mode for a statement to PDO_FETCH_BOTH

PDOStatement::setFetchMode(PDO_FETCH_NUM)
PDOStatement::setFetchMode(PDO_FETCH_ASSOC)
PDOStatement::setFetchMode(PDO_FETCH_BOTH)
PDOStatement::setFetchMode(PDO_FETCH_OBJ)
set default fetch() mode for a statement.

PDOStatement::setFetchMode(PDO_FETCH_COLUMN, int colno)
set default fetch() mode to retrieve colno-th column on each fetch() call.

PDOStatement::setFetchMode(PDO_FETCH_CLASS, string classname [, array ctor args])
set default fetch() mode to create an instance of classname,
calling it's ctor, passing the optional ctor args.
The names of the columns in the result set will be used as property names on
the object instance. PPP rules apply.

[NOTE: calling ctor is not yet implemented]
[TODO: this might crash PHP for persistent PDO handles]

PDOStatement::setFetchMode(PDO_FETCH_INTO, object obj)
Similar to PDO_FETCH_CLASS, except that each iteration will update the
supplied object properties.

[TODO: this might crash PHP for persistent PDO handles]

The default fetch() mode is used when no parameters are passed to
PDOStatement::fetch(). When using a statement in an iterator context,
PDOStatement::fetch() is called implicitly on each iteration.

object PDO::queryAndIterate(string sql, <PDOStatement::setFetchMode args>)
This is semantically equivalent to:

$stmt = $pdo->prepare($sql);
$stmt->execute();
$stmt->setFetchMode($args);
return $stmt;


Example/Intended usage:

/* fetch an array with numeric and string keys */
foreach ($pdo->queryAndIterate("select NAME, VALUE from test") as $row) {
debug_zval_dump($row);
}

/* fetch the value of column 1 into $row on each iteration */
foreach ($pdo->queryAndIterate("select NAME, VALUE from test",
PDO_FETCH_COLUMN, 1) as $row) {
debug_zval_dump($row); // string(3) "foo"
}

/* create a new instance of class Foo on each iteration */
foreach ($pdo->queryAndIterate("select NAME, VALUE from test",
PDO_FETCH_CLASS, 'Foo') as $row) {
debug_zval_dump($row);
/*
Object(Foo)#4 (2) refcount(2){
["NAME"]=>
string(12) "foo220051429" refcount(2)
["VALUE"]=>
string(12) "bar789825748" refcount(2)
}
*/
}

etc.

show more ...


Revision tags: PRE_NEW_VM_GEN_PATCH
# eb0cd48d 26-Sep-2004 Wez Furlong

Add rough cut at fetching meta data.


Revision tags: php-5.0.2, php-4.3.9, php-5.0.2RC1, php-4.3.9RC3, PRE_ZEND_VM_DISPATCH_PATCH, php-4.3.9RC2, php-5.0.1, php-5.0.1RC2, php-4.3.9RC1, php-5.0.1RC1, RELEASE_0_1
# 0d002664 19-Jul-2004 Wez Furlong

Implement empty-string-to-null conversion option for oracle compat.
This can be enabled using:
$dbh->setAttribute(PDO_ATTR_ORACLE_NULLS, true);


Revision tags: php-5.0.0RC4, php-5.0.0, php-4.3.8
# 905fbfd8 12-Jul-2004 Ilia Alshanetsky

Added missing constant and correct bound column retrieval. When bound
columns are specified only return status (TRUE/FALSE) indicator.


# 41b639ff 09-Jul-2004 Ilia Alshanetsky

Fixed function proto.


# 2ba792cd 05-Jul-2004 Ilia Alshanetsky

Don't use alloca() where it can reached by the users.


# f9139589 15-Jun-2004 Ard Biesheuvel

Un-revert param index fix


# e48d1272 15-Jun-2004 Ard Biesheuvel

Revert (at Wez's request)


# 1d7a4ed4 13-Jun-2004 Ard Biesheuvel

Report param binding error


# 50ac5db2 12-Jun-2004 Ard Biesheuvel

Added double param type
Added param struct initialiser
Reversed param parsing order (long <=> string)


Revision tags: php-5.0.0RC3, php-5.0.0RC3RC2, php-4.3.7, php-5.0.0RC3RC1
# d2a8d5a8 25-May-2004 Wez Furlong

get/set attributes for statements


# 7a87af33 25-May-2004 Wez Furlong

Some definitions for cursors.
Define a mechanism for driver-specific attributes.
Use a refcount for the stmt structure.


# cf75eb8a 25-May-2004 Ilia Alshanetsky

Cleanup.


# 402de24f 25-May-2004 Ilia Alshanetsky

One more leak down.


# b7ecaca1 25-May-2004 Ilia Alshanetsky

More leak fixes.


# 0c762dff 25-May-2004 Ilia Alshanetsky

More possible leak fixes (Thanks Tony).


# 9280b88a 25-May-2004 Ilia Alshanetsky

One more memory leak.


# d782abf4 25-May-2004 Ilia Alshanetsky

More leak fixes.


Revision tags: php-4.3.7RC1, RELEASE_0_1_1
# 4d01a5c2 21-May-2004 George Schlossnagle

ok, apprently we _don't_ want to count the nulls.


# 1ee89e1b 21-May-2004 George Schlossnagle

remove debugging


# 518cf77f 21-May-2004 George Schlossnagle

fix fubar'd emulated bindings


# d8d7dd7e 21-May-2004 Wez Furlong

Allow lazy fetch to work with numeric offsets.
Fix named parameters...


# 8f5b2126 21-May-2004 Wez Furlong

store the name length in the same manner as it is stored in zvals


# ed83c5be 21-May-2004 Wez Furlong

Tidy up placeholder flags


12345678910