Last active
June 22, 2018 09:10
-
-
Save kitz99/f7630fe0b5c7a95b8e642959acaf47ae to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func updateRecord(fieldName string, newVal string, condFieldName string, condFieldValue int64) error { | |
qryString := fmt.Sprintf("UPDATE posts set %s='%s' WHERE %s=%d", fieldName, newVal, condFieldName, condFieldValue) | |
fmt.Printf("Query: %v\n", qryString) | |
_, err := roachConnection.Exec(qryString) | |
return err | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment