Check-in [44a53a1581]
Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | For absent results, allow singular ->property_row access to silently return NULL. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
44a53a1581a11162343422f152dd43f8 |
User & Date: | mario 2014-11-03 02:12:56 |
Context
2014-11-03
| ||
02:15 | Add CloudFlare and DB statistics to frontpage (replacing no-ads whitebox). check-in: 08ed5cd6ea user: mario tags: trunk | |
02:12 | For absent results, allow singular ->property_row access to silently return NULL. check-in: 44a53a1581 user: mario tags: trunk | |
02:12 | Avoid lengthy loops with SQL SELECT queries in cron jobs, to eschew SQLite database locking up meanwhile. check-in: b147818f59 user: mario tags: trunk | |
Changes
Changes to lib/db.php.
︙ | ︙ | |||
383 384 385 386 387 388 389 | return call_user_func_array(array($this->results, $func), $args); } // Single column access function offsetGet($name) { // get first result, transfuse into $this | > | > | > > | > > | 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 | return call_user_func_array(array($this->results, $func), $args); } // Single column access function offsetGet($name) { // get first result, transfuse into $this if (is_object($r = $this->results)) { unset($this->results); if ($row = $r->fetch()) { $this->exchangeArray($row); } // no row returned, silently return else { return NULL; } } // suffice __get return parent::offsetGet($name); } // Just let PDOStatement handle the Traversable |
︙ | ︙ |