Changes between Initial Version and Version 1 of Ticket #16336
- Timestamp:
- 01/21/2011 10:52:28 PM (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #16336
- Property Keywords close added
-
Property
Component
changed from
GeneraltoDatabase
-
Ticket #16336 – Description
initial v1 1 1 wpdb::get_row never uses the cached results, look at this 2 2 3 {{{ 3 4 function get_row( $query = null, $output = OBJECT, $y = 0 ) { 4 5 $this->func_call = "\$db->get_row(\"$query\",$output,$y)"; … … 8 9 return null; 9 10 // more code 11 }}} 10 12 11 13 and then 12 14 15 {{{ 13 16 function query( $query ) { 14 17 if ( ! $this->ready ) … … 21 24 $return_val = 0; 22 25 $this->flush(); 23 26 }}} 24 27 25 28 See how the cache never gets called? if you write a query, the old one gets flushed without checking if it was the same as before, if you use null, null gets returned, an if($this->last_query != $query) needs to be put in ::query or the return null removed from ::get_row, I'd prefer the first solution.