Code

bugfix at create_table: column names are now with '' in sql-statement
authorrettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 5 Mar 2008 13:05:30 +0000 (13:05 +0000)
committerrettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 5 Mar 2008 13:05:30 +0000 (13:05 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9356 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-si/modules/DBsqlite.pm

index b2b628fd56f9183c6217aa6f3e420cf0213f7f78..11d48fe6d117ed2eaa8214c8ad2e15913ae3034e 100644 (file)
@@ -79,8 +79,8 @@ sub create_table {
     }
 
     $col_names->{ $table_name } = $col_names_ref;
-    my $col_names_string = join(', ', @col_names);
-    my $sql_statement = "CREATE TABLE IF NOT EXISTS $table_name ( $col_names_string )"; 
+    my $col_names_string = join("', '", @col_names);
+    my $sql_statement = "CREATE TABLE IF NOT EXISTS $table_name ( '$col_names_string' )"; 
     &create_lock($self,'create_table');
     $self->{dbh}->do($sql_statement);
     &remove_lock($self,'create_table');