Re: Paged Results Set in MySQL DB with one result

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Or just break the "page" up into sections and grab subsequent sections from the DB. (?) That way you could easily code in a 'jump to page 3 from page 6' type function, and your still just grabbing data and spitting it out with out worrying about sessions getting mangled or parsing for html comments that could get blasted by an errant edit.

Ed


On May 3, 2006, at 5:25 PM, Jochem Maas wrote:

Phillip S. Baker wrote:
Greetings Gents,
I have an interesting problem I would like some ideas on for a solution.

I was going to make a comment about the use of 'interesting' but thought
better of it. ;-)

I cannot seem to find any code examples on the net, though I might not be looking in the right place really.
I have some articles stored in a MySQL DB.
What I want is if the article is above a certain length in characters, to page article through a few pages for site readability.
So I would want to print X number of words/characters.
Save the where the pointer is, move on to the next page, and display the same amount and so on for as many pages as needed. I know about pulling paged results using the limit function but that would not seem to apply as really I would want to page the results within one record (one field really).
Does anyone have any ideas??

I'm with Jay on the ideas front, here is mine:

ON THE EDITING SIDE:
1. use a customizable wysiwyg web based editor to edit your articles.
2. add a button called 'page break' that inserts something like '<!-- PAGEBREAK (notice I made it an HTML comment - that's handy, you can hopefully see why)

ON THE DISPLAY SIDE:
1. grab the [formatted] text for the item/article in question.
2. split the text on the string you button injects into the content
determine the selected page (via GET param or something like that) into an array
3. find the the array item corresponding the requested 'article page'
4. display the array item from point 3.

the philosphy is that any half-baked article author will know much better where to place a 'page break' than any code you could write - because it comes down to trying to automate DTP/design - which AFAIC only a human can do
properly.

Thanks
Phillip

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux