Please attach a current version of the file so I can see it after the changes you made.
It looks like there is an extra S in the select statement for that second recordset that may be the problem:
$rsPrev = mysql_query(sprintf("SSELECT * FROM productos WHERE prodID = %s AND prodID < %s ORDER BY prodID DESC LIMIT 0, 1", GetSQLValueString($colname_rsProductos, "int"), GetSQLValueString($colname_rsProductos, "int")));
should be:
$rsPrev = mysql_query(sprintf("SELECT * FROM productos WHERE prodID = %s AND prodID < %s ORDER BY prodID DESC LIMIT 0, 1", GetSQLValueString($colname_rsProductos, "int"), GetSQLValueString($colname_rsProductos, "int")));