March 2019
Intermediate to advanced
336 pages
9h 9m
English
The DeleteCustomer method deletes the customer that's passed by executing the DELETE statement:
// Delete Customer method with parameter customerfunc DeleteCustomer(customer Customer) { var database *sql.DB database= GetConnection() var error error var delete *sql.Stmt delete,error = database.Prepare("DELETE FROM Customer WHERE Customerid=?") if error != nil { panic(error.Error()) } delete.Exec(customer.CustomerId) defer database.Close()}
Let's take a look at the CRM web application in the next section.
Read now
Unlock full access