Working with objects - Component overview - Query - Fetching strategies.php 462 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26

<code type="php">
// select all users and load the data directly (Immediate fetching strategy)

$coll = $conn->query("FROM User-I");

// or

$coll = $conn->query("FROM User-IMMEDIATE");

// select all users and load the data in batches

$coll = $conn->query("FROM User-B");

// or 

$coll = $conn->query("FROM User-BATCH");

// select all user and use lazy fetching

$coll = $conn->query("FROM User-L");

// or 

$coll = $conn->query("FROM User-LAZY");
</code>