[go-nuts] Re: Retrieve Unknown Rows & Columns From a MySQL Table (Golang)

2017-09-15 Thread Alexandre K
So, I'm really close to accomplishing my goal. Can anyone help me with the very last command IN THIS CODE??? <https://gist.github.com/akalaj/a8087ef8a23f21de3240717862624f58> On Thursday, September 14, 2017 at 4:59:59 PM UTC-7, Alexandre K wrote: > > Hello Everyone, > >

[go-nuts] Re: Retrieve Unknown Rows & Columns From a MySQL Table (Golang)

2017-09-15 Thread Alexandre K
nil { log.Fatal(err) } //The below Println command prints values, but //it prints them as memory addresses like this => "[0xc42000c600 0xc42000c620]" //How can I print the string values retrieved from MySQL??? fmt.Println(vals) } } On Thursday, Se

[go-nuts] Re: Retrieve Unknown Rows & Columns From a MySQL Table (Golang)

2017-09-15 Thread Alexandre K
tal(err) } //The below Println command prints values, but //it prints them as memory addresses like this => "[0xc42000c600 0xc42000c620]" //How can I print the string values retrieved from MySQL??? fmt.Println(vals) } } On Thursday, September 1

[go-nuts] Re: Retrieve Unknown Rows & Columns From a MySQL Table (Golang)

2017-09-14 Thread Alexandre K
err = rows.Scan(vals...) > // Now you can check each element of vals for nil-ness, > if err != nil { > log.Fatal(err) > } > for i := range cols { > fmt.Println(vals[i]) > } > } > } > > >

[go-nuts] Re: Retrieve Unknown Rows & Columns From a MySQL Table (Golang)

2017-09-14 Thread Alexandre K
// Now you can check each element of vals for nil-ness, > if err != nil { > log.Fatal(err) > } > for i := range cols { > fmt.Println(vals[i]) > } > } > } > > > On Friday, September 15, 20

Re: [go-nuts] Re: Retrieve Unknown Rows & Columns From a MySQL Table (Golang)

2017-09-14 Thread Alexandre K
compile error suggests. > > I'm guessing you want rows, if so have a look at: > https://golang.org/pkg/database/sql/#DB.Query > > On 15/09/2017 03:10, Alexandre K wrote: > > Thank you so much for your response! > > The code you added probably works, but I'm getting he

[go-nuts] Re: Retrieve Unknown Rows & Columns From a MySQL Table (Golang)

2017-09-14 Thread Alexandre K
Thank you so much for your response! The code you added probably works, but I'm getting held up by something else. I'm running into a set of errors when I execute this on the command line...It seems the "rows" value I'm creating doesn't have the functionality that the guide says it would

[go-nuts] Retrieve Unknown Rows & Columns From a MySQL Table (Golang)

2017-09-14 Thread Alexandre K
Hello Everyone, I'm new to Golang and I am trying to figure out how to retrieve multiple unknown columns and rows from a table. I have an example table called ANIMALS . I am trying to follow the example at the bottom of this GUID