En referencia al orden by que realizaste
Código PHP:
$sql = "SELECT *
FROM $t_adpics p ORDER BY picid
WHERE p.adid = $xadid
AND isevent = '$isevent'";
$pres = mysql_query($sql);
Recuerda que la sintaxis del ORDEN BY es
Cita: SELECT "column_name"
FROM "table_name"
[WHERE "condition"]
ORDER BY "column_name" [ASC, DESC]
Faltaria indicarle Ascendente o Descendente
Código PHP:
$sql = "SELECT *
FROM $t_adpics p
WHERE p.adid = $xadid
AND isevent = '$isevent'
ORDER BY picid [ASC, DESC]
";