I would like to SELECT all values in a table starting at the 2nd result! Anyone know a solution to this without doing a query like SELECT X FROM Y LIMIT 2,47358927354 ???
here's an example for a different vendor with coldfusion sprinkled in, but you should get the idea, and I didn't feel like cleaning it up ;p SELECT an_id, as_ShortName, ac_name, an_date, an_link, an_title, an_description, an_remote_id, an_hasCache AS isCached FROM ( SELECT TOP #PerPage# * FROM ( SELECT TOP #Evaluate(PerPage * PageNum)# MIN(an_id) AS MinID FROM Archives_News LEFT JOIN Archives_Sites ON as_id = an_as_id LEFT JOIN Archives_Categories ON ac_id = an_ac_id GROUP BY an_as_id, an_title, an_remote_id ORDER BY MIN(an_id) DESC ) inner1 ORDER BY MinID ) inner2 INNER JOIN Archives_News ON MinID = an_id LEFT JOIN Archives_Sites ON as_id = an_as_id LEFT JOIN Archives_Categories ON ac_id = an_ac_id ORDER BY an_id DESC Code (markup):
tiptopvillas is right. You need to parse out that record in your php script. The LIMIT clause allows you to set an offset value, but there is no way (that I know of) to use the LIMIT clause without limiting the rows returned. Either that, or use your first solution and put a crazy high number in your rowcount parameter.
Thanks guys. Just thought there might be an operator for the LIMIT command that could be used to select everything after a certain point.
Nah the one I'm exluding is the newest 1 which will always be changing. The reason I'm excluding it is because it gets displayed at the top of the page.