quale è la sintassi corretta per effettuare un LIMIT in una chiamata al database?
il mio codice è il seguente
la parte iniziare mi prende i dati che passo di pagina in pagina per l'impaginazione, e poi mi dovrebbe prendere dal database i dati corretti, ma cio non accade, xche?Codice PHP:a = 0
b = 6
b=request.querystring("b")
a=request.querystring("a")
if b > 6 then
a = a-6
b = b-6
else
a = a+6
b = b+6
end if
SQL= " SELECT * FROM galleria ORDER BY ID LIMIT "&a&","&b
set RS = Conn.execute(SQL)
x=0
do while not RS.eof
if x = 0 then
foto1 = RS("Foto1")
variabilebig1 = RS("Foto2")
end if
if x = 1 then
foto2 = RS("Foto1")
variabilebig2 = RS("Foto2")
end if
if x = 2 then
foto3 = RS("Foto1")
variabilebig3 = RS("Foto2")
end if
if x = 3 then
foto4 = RS("Foto1")
variabilebig4 = RS("Foto2")
end if
if x = 4 then
foto5 = RS("Foto1")
variabilebig5 = RS("Foto2")
end if
if x = 5 then
foto6 = RS("Foto1")
variabilebig6 = RS("Foto2")
end if
x=x+1
RS.MoveNext
Loop

Rispondi quotando
VVoVe:
