| @@ 192-208 (lines=17) @@ | ||
| 189 | $i = 0 ; |
|
| 190 | ||
| 191 | // ok, we have a result with one or more rows, loop out the rows and output as array |
|
| 192 | while($row = $result->{$method}()){ |
|
| 193 | $key = $i; |
|
| 194 | ||
| 195 | if($assoc && !empty($index)){ |
|
| 196 | ||
| 197 | if($fetch_array && isset($row[$index])){ |
|
| 198 | $key = $row[$index]; |
|
| 199 | } |
|
| 200 | elseif(isset($row->{$index})){ |
|
| 201 | $key = $row->{$index}; |
|
| 202 | } |
|
| 203 | ||
| 204 | } |
|
| 205 | ||
| 206 | $out[$key] = $row; |
|
| 207 | $i++; |
|
| 208 | } |
|
| 209 | ||
| 210 | $result->free(); |
|
| 211 | ||
| @@ 200-217 (lines=18) @@ | ||
| 197 | $i = 0 ; |
|
| 198 | ||
| 199 | // ok, we have a result with one or more rows, loop out the rows and output as array |
|
| 200 | while($row = $stmt->fetch($method)){ |
|
| 201 | $key = $i; |
|
| 202 | ||
| 203 | if($assoc && !empty($index)){ |
|
| 204 | ||
| 205 | if($fetch_array && isset($row[$index])){ |
|
| 206 | $key = $row[$index]; |
|
| 207 | } |
|
| 208 | else if(isset($row->{$index})){ |
|
| 209 | $key = $row->{$index}; |
|
| 210 | } |
|
| 211 | ||
| 212 | } |
|
| 213 | ||
| 214 | $out[$key] = $row; |
|
| 215 | $i++; |
|
| 216 | ||
| 217 | } |
|
| 218 | ||
| 219 | return $out; |
|
| 220 | } |
|