Albirew/nyaa-pantsu
Archivé
1
0
Bifurcation 0

Merge pull request #4 from ayame-git/master

fixed pagination
Cette révision appartient à :
Eliot Whalan 2017-05-03 20:04:18 +10:00 révisé par GitHub
révision 8437e6aaf3

Voir le fichier

@ -125,7 +125,7 @@ func searchHandler(w http.ResponseWriter, r *http.Request) {
rows, err := dbHandle.Query("select torrent_id, torrent_name, status_id, torrent_hash from torrents "+ rows, err := dbHandle.Query("select torrent_id, torrent_name, status_id, torrent_hash from torrents "+
"where torrent_name LIKE ? AND category_id LIKE ? AND sub_category_id LIKE ? "+ "where torrent_name LIKE ? AND category_id LIKE ? AND sub_category_id LIKE ? "+
"ORDER BY torrent_id DESC LIMIT 50 offset ?", "ORDER BY torrent_id DESC LIMIT 50 offset ?",
"%"+html.EscapeString(param1)+"%", html.EscapeString(param2)+"%", html.EscapeString(param3)+"%", 50*pagenum-1) "%"+html.EscapeString(param1)+"%", html.EscapeString(param2)+"%", html.EscapeString(param3)+"%", 50*(pagenum-1))
for rows.Next() { for rows.Next() {
var id, name, hash, magnet string var id, name, hash, magnet string
var status int var status int