Update all database queries such that we can run "php index.php

package" and generate the same SQL as before.
This commit is contained in:
Bharat Mediratta
2009-12-17 21:05:58 -08:00
parent 2aba8c4bff
commit 9b75b85e71
2 changed files with 56 additions and 32 deletions
+4 -3
View File
@@ -42,7 +42,7 @@ class Packager_Controller extends Controller {
// Drop all tables
foreach ($db->list_tables() as $table) {
$db->query("DROP TABLE IF EXISTS `$table`");
$db->query("DROP TABLE IF EXISTS {{$table}}");
}
// Clean out data
@@ -88,8 +88,9 @@ class Packager_Controller extends Controller {
$db->query("TRUNCATE {sessions}");
$db->query("TRUNCATE {logs}");
$db->query("DELETE FROM {vars} WHERE `module_name` = 'gallery' AND `name` = '_cache'");
$db->update("users", array("password" => ""), array("id" => 1));
$db->update("users", array("password" => ""), array("id" => 2));
db::build()->update("users", array("password" => ""), array("id" => 1))->execute();
db::build()->update("users", array("password" => ""), array("id" => 2))->execute();
$dbconfig = Kohana::config('database.default');
$conn = $dbconfig["connection"];