Open Ghada-Emad1 opened 2 months ago
Your INSERT query needs columns. Try updating 2nd line in Insert
func to:
err := m.DB.QueryRow(`INSERT INTO snippets (title, content, expires) VALUES ($1,$2,$3) RETURNING id`, title, content, expires).Scan(&pk)
thanks for your response ,i finally solved that dummy error
i want to return last index has been inserted into db
but it always gives me that error