projects
/
pear
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
29ece3c
)
SQL/Parser/Compiler.php
author
Alan Knowles
<alan@akbkhome.com>
Mon, 14 Feb 2011 04:18:08 +0000
(12:18 +0800)
committer
Alan Knowles
<alan@akbkhome.com>
Mon, 14 Feb 2011 04:18:08 +0000
(12:18 +0800)
SQL/Parser/Compiler.php
patch
|
blob
|
history
diff --git
a/SQL/Parser/Compiler.php
b/SQL/Parser/Compiler.php
index
f3e2638
..
20e78f9
100755
(executable)
--- a/
SQL/Parser/Compiler.php
+++ b/
SQL/Parser/Compiler.php
@@
-329,8
+329,11
@@
class SQL_Parser_Compiler
// {{{ function compileInsert()
function compileInsert()
{
- $sql = 'insert into '.$this->tree['table_names'][0].' ('.
- implode(', ', $this->tree['column_names']).') values (';
+ $sql = 'insert into ' . $this->tree['table_names'][0] .
+ (isset($this->tree['column_names']) ?
+ ' (' . implode(', ', $this->tree['column_names']) . ')' :
+ ''
+ ) . ' values (';
$c_vals = count($this->tree['values']);
for ($i = 0; $i < $c_vals; $i++) {