aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikunoNaka <bokuwakanojogahoshii@yahoo.com>2021-06-13 23:56:43 +0530
committerMikunoNaka <bokuwakanojogahoshii@yahoo.com>2021-06-13 23:56:43 +0530
commitd154e1e37b026679fc76c6708f6b16951ed07dd9 (patch)
tree87ab87e5d0356b8b2224a583ed260a27a0ade0b0
parentb000b2237af35fad5267e24a45f35897bd4d7d6e (diff)
minor bug fix
-rw-r--r--server/database/people.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/server/database/people.go b/server/database/people.go
index e0930b0..ac2affa 100644
--- a/server/database/people.go
+++ b/server/database/people.go
@@ -23,7 +23,7 @@ type Person struct {
func GetAllPeople() []Person {
var allPeople []Person
rows, _ := myDatabase.Query(
- `SELECT id, Name, Phone, Email FROM People`,
+ `SELECT Name, Address, Phone, Email FROM People`,
)
var (
@@ -39,11 +39,10 @@ func GetAllPeople() []Person {
}
func RegisterPerson(person Person) bool {
-
register_person, _ := myDatabase.Prepare(
`INSERT INTO People
(Name, Address, Phone, Email)
- VALUES (?, ?, ?)`,
+ VALUES (?, ?, ?, ?)`,
)
register_person.Exec(