technomad Posted March 11, 2009 Share Posted March 11, 2009 I need to insert a paragraph before a set of records that results from a MySQL query. The paragraph options are context sensitive and are stored in a field named 'IntroParagraph'. If the query asks to return all records WHERE City = 'New York', then the IntroParagraph about New York should be inserted above the list of records. However, if the results require more than one page, I only want the paragraph to show up on the first page. Can anyone tell me the best way to do this? Thanks. P.S. I'm on a today deadline, so any help would be appreciated asap. Link to comment https://forums.phpfreaks.com/topic/148945-solved-insert-intro-paragraph-on-page-1-only-before-recordset/ Share on other sites More sharing options...
lonewolf217 Posted March 11, 2009 Share Posted March 11, 2009 are we assuming here that the entire set of records will always point to a single subject ? if so: 1) check what page you are on 2) retrieve the first row 3) check the subject that you are dealing with 4) output the appropriate IntroParagraph Link to comment https://forums.phpfreaks.com/topic/148945-solved-insert-intro-paragraph-on-page-1-only-before-recordset/#findComment-782067 Share on other sites More sharing options...
technomad Posted March 11, 2009 Author Share Posted March 11, 2009 that worked well. thank you lonewolf! Link to comment https://forums.phpfreaks.com/topic/148945-solved-insert-intro-paragraph-on-page-1-only-before-recordset/#findComment-782191 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.