Fixed misc Firebird issues, added file chooser to add database dialog
This commit is contained in:
parent
774ee1f74a
commit
c938964260
@ -54,7 +54,7 @@ class firebird {
|
||||
function truncate($table)
|
||||
{
|
||||
// Firebird lacka a truncate command
|
||||
$sql = "DELETE FROM {$table}";
|
||||
$sql = 'DELETE FROM '.$table.'"';
|
||||
$this->query($sql);
|
||||
}
|
||||
|
||||
|
@ -85,9 +85,7 @@ class firebird_manip extends db_manip{
|
||||
*/
|
||||
function delete_table($name)
|
||||
{
|
||||
return <<<SQL
|
||||
DROP TABLE "{$name}"
|
||||
SQL;
|
||||
return 'DROP TABLE "'.$name.'"';
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
*/
|
||||
class Add_DB extends GtkWindow {
|
||||
|
||||
var $conn, $dbtype, $host, $user, $pass, $database, $settings;
|
||||
var $conn, $dbtype, $host, $user, $pass, $database, $settings, $db_file;
|
||||
|
||||
function __construct()
|
||||
{
|
||||
@ -74,6 +74,17 @@ class Add_DB extends GtkWindow {
|
||||
|
||||
}
|
||||
|
||||
// DB File
|
||||
{
|
||||
$filelbl = new GtkLabel("Database file");
|
||||
$this->dbfile = new GtkFileChooserButton("Select a database file", Gtk::FILE_CHOOSER_ACTION_OPEN);
|
||||
$filealign = new GtkAlignment(0, 0.5, 0, 0);
|
||||
$filealign->add($filelbl);
|
||||
|
||||
$table->attach($filealign, 0, 1, ++$y1, ++$y2);
|
||||
$table->attach($this->dbfile, 1, 2, $y1, $y2);
|
||||
}
|
||||
|
||||
// Host
|
||||
{
|
||||
$this->_add_row($table, "DB Host", $this->host, $y1, $y2);
|
||||
|
Reference in New Issue
Block a user