bugfix insert lastid in mysql
This commit is contained in:
		
							
								
								
									
										2
									
								
								db.go
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								db.go
									
									
									
									
									
								
							@@ -484,7 +484,7 @@ func (t *TableInfo) Insert(record AssRow) (int, error) {
 | 
				
			|||||||
		if err != nil {
 | 
							if err != nil {
 | 
				
			||||||
			return id, err
 | 
								return id, err
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		err = t.db.conn.QueryRow("LAST_INSERT_ID();").Scan(&id)
 | 
							err = t.db.conn.QueryRow("SELECT LAST_INSERT_ID();").Scan(&id)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	return id, err
 | 
						return id, err
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user