bug fixed #152
This commit is contained in:
parent
954c413725
commit
e09d89acb3
|
@ -905,9 +905,11 @@ func (statement *Statement) Asc(colNames ...string) *Statement {
|
||||||
//The join_operator should be one of INNER, LEFT OUTER, CROSS etc - this will be prepended to JOIN
|
//The join_operator should be one of INNER, LEFT OUTER, CROSS etc - this will be prepended to JOIN
|
||||||
func (statement *Statement) Join(join_operator, tablename, condition string) *Statement {
|
func (statement *Statement) Join(join_operator, tablename, condition string) *Statement {
|
||||||
if statement.JoinStr != "" {
|
if statement.JoinStr != "" {
|
||||||
statement.JoinStr = statement.JoinStr + fmt.Sprintf(" %v JOIN %v ON %v", join_operator, tablename, condition)
|
statement.JoinStr = statement.JoinStr + fmt.Sprintf(" %v JOIN %v ON %v", join_operator,
|
||||||
|
statement.Engine.Quote(tablename), condition)
|
||||||
} else {
|
} else {
|
||||||
statement.JoinStr = fmt.Sprintf("%v JOIN %v ON %v", join_operator, tablename, condition)
|
statement.JoinStr = fmt.Sprintf("%v JOIN %v ON %v", join_operator,
|
||||||
|
statement.Engine.Quote(tablename), condition)
|
||||||
}
|
}
|
||||||
return statement
|
return statement
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue