Golang - Why SQL placeholder not work?
<p>My code is as follow (I use gorm):</p>

<pre><code>e.GET("/search", func(c echo.Context) error {
    keyword := c.QueryParam("keyword")

    results := make([]searchResult, 0)
    if keyword != "" {
        db, err := models.ConnectDB()
        defer db.Close()
        if err != nil {
            return err
        }

        rows, err := db.Raw("SELECT songs.name, singers.name, albums.name FROM songs, singers, albums WHERE (songs.singer_id = singers.id AND songs.album_id = albums.id) AND (songs.name LIKE '%?%' OR singers.name LIKE '%?%' OR albums.name LIKE '%?%')", keyword, keyword, keyword).Rows()
        defer rows.Close()

        var songName, singerName, albumName string
        if err == nil {
            for rows.Next() {
                rows.Scan(&amp;songName, &amp;singerName, &amp;albumName)
                results = append(results, searchResult{
                    SongName:   songName,
                    SingerName: singerName,
                    AlbumName:  albumName,
                })
            }
        } else {
            return err
        }
    }
    return c.Render(http.StatusOK, "search", results)
})
</code></pre>

<p>I got error: <code>sql: statement expects 0 inputs; got 3</code>, so it means the placeholder didn't be parsed. Could anyone give me some idea? </p>

<p>I can't find out why by myself.</p>

<p>Please help me. Thanks.</p>