mirror of
https://github.com/github/codeql.git
synced 2025-12-19 10:23:15 +01:00
14 lines
245 B
Go
14 lines
245 B
Go
package main
|
|
|
|
import (
|
|
"database/sql"
|
|
"fmt"
|
|
"net/http"
|
|
)
|
|
|
|
func handler(db *sql.DB, req *http.Request) {
|
|
q := fmt.Sprintf("SELECT ITEM,PRICE FROM PRODUCT WHERE ITEM_CATEGORY='%s' ORDER BY PRICE",
|
|
req.URL.Query()["category"])
|
|
db.Query(q)
|
|
}
|