echo rtrim($s,';').";\n";
}
+ #bye($this->db()->type);
+ $fct = $this->conf_type('table.sql.create',false);
+ if (!$fct) $fct = false;
foreach ($tables as $t) {
# DROP / CREATE
$t->rows();
if ($type_to) $this->type = $type_to;
}
+
}
$i = 0; foreach ((array)$this->method('sql.post') as $s) {
$keys[] = $f->sql_name();
}
- return "INSERT INTO ".$this->sql_name()." VALUES (".join(',',array_values($values)).");".NB_EOL;
- return "INSERT INTO ".$this->sql_name()." (".join(',',$keys).") VALUES (".join(',',array_values($values)).");".NB_EOL;
+ $sql = "INSERT INTO ".$this->sql_name()." VALUES (".join(',',array_values($values)).");";
+ #$sql = "INSERT INTO ".$this->sql_name()." (".join(',',$keys).") VALUES (".join(',',array_values($values)).");";
+ #if ($fct and $this->name=='place') debug($sql);
+ return $sql.NB_EOL;
}
public function rows_end_sql() {
'table.sql.create' => function($sql,$t) {
#$sql .= $t->db()->row("SELECT sql FROM sqlite_master WHERE type='index' AND tbl_name=".$t->sql_name());
$sql = str_replace("\\'","''",$sql);
+ #$sql = preg_replace("/\\'/","''",$sql);
+ #$sql = 'espace';
+ #$sql = "zaza $sql";
+ #debug($sql);
return $sql;
},
);?>