Changeset 416 for trunk/lib/DB.inc.php
- Timestamp:
- Jul 3, 2013 1:00:48 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/DB.inc.php
r396 r416 161 161 } 162 162 163 // Die if db_die_on_failure = true, or just continue without connection 163 // Die if db_die_on_failure = true, or just continue without connection. 164 164 return $this->_fail(); 165 165 } … … 190 190 return false; 191 191 } 192 192 $this->_connected = false; 193 193 return mysql_close($this->dbh); 194 } 195 196 /* 197 * 198 * 199 * @access public 200 * @param 201 * @return 202 * @author Quinn Comendant <quinn@strangecode.com> 203 * @version 1.0 204 * @since 03 Jul 2013 14:50:23 205 */ 206 function reconnect() 207 { 208 $this->close(); 209 $this->connect(); 194 210 } 195 211 … … 284 300 echo "<!-- ----------------- Query $this->_query_count ---------------------\n$debugqry\n-->\n"; 285 301 } 302 303 sleep(30); 304 305 // Ensure we have an active connection. 306 if (!mysql_ping($this->dbh)) { 307 $app->logMsg('MySQL ping failed; reconnectingâŠ', LOG_NOTICE, __FILE__, __LINE__); 308 $this->reconnect(); 309 } 286 310 287 311 // Execute!
Note: See TracChangeset
for help on using the changeset viewer.