| | |
| | | die("Access denied!"); |
| | | } |
| | | |
| | | $options = array( |
| | | 'use_transactions' => false, |
| | | 'log_line_break' => "\n", |
| | | 'idxname_format' => '%s', |
| | | 'debug' => false, |
| | | 'quote_identifier' => true, |
| | | 'force_defaults' => false, |
| | | 'portability' => true |
| | | ); |
| | | |
| | | $dbh =& MDB2::factory($config->get('db_dsnw'), $options); |
| | | $dbh = MDB2::factory($config->get('db_dsnw'), $options); |
| | | if (PEAR::isError($dbh)) { |
| | | exit($mdb2->getMessage()); |
| | | } |
| | |
| | | if (PEAR::isError($res)) { |
| | | $dbh->disconnect(); |
| | | exit($res->getMessage()); |
| | | }; |
| | | } |
| | | |
| | | $res =& $dbh->exec("DELETE FROM messages"); |
| | | if (PEAR::isError($res)) { |
| | | $dbh->disconnect(); |
| | | exit($res->getMessage()); |
| | | }; |
| | | } |
| | | |
| | | echo "Cache cleared\n"; |
| | | |