|
|
@ -419,6 +419,9 @@ func (this *Query) List() ([]map[string]string, error) { |
|
|
|
* return row error |
|
|
|
*/ |
|
|
|
func (this *Query) Find() (map[string]string, error) { |
|
|
|
|
|
|
|
log.Println(this.conn) |
|
|
|
|
|
|
|
conn, err := connectDb(dbhost_slaver, dbuser_slaver, dbpwd_slaver, dbname_slaver, dbport_slaver, 1, 0) |
|
|
|
|
|
|
|
if err != nil { |
|
|
@ -428,6 +431,14 @@ func (this *Query) Find() (map[string]string, error) { |
|
|
|
log.Println("Err: no conn") |
|
|
|
} |
|
|
|
|
|
|
|
var connection_id int |
|
|
|
err = conn.QueryRow("select CONNECTION_ID()").Scan(&connection_id) |
|
|
|
if err != nil { |
|
|
|
log.Println("query connection id failed:", err) |
|
|
|
} else { |
|
|
|
log.Println("connection id:", connection_id) |
|
|
|
} |
|
|
|
|
|
|
|
_, row, err := GetRow(conn, this.dbname, this.table, this.alias, this.title, this.join, |
|
|
|
this.where, this.where_or, this.value, this.orderby, this.debug) |
|
|
|
|
|
|
|