Welcome to WebmasterWorld Guest from 126.96.36.199
I wonder if someone might be able to suggest which method of extracting one of a number of paragraphs of text (perhaps with some HTML style tags included) would be best for me? I am generating a dynamic HTML page (describing items of music) which has a synopsys paragraph followed by some shorter items of data presented in tabular form (multiple recording dates and available CDs, and the orchestration, etc).
I'm storing the short tabular data in a MySQL database along with my menu system, etc.
Should I put the paragraphs in a separate text file - with identifiable start/end delimiters - and parse the file (each time the webpage PHP is executed) into an array ($title => $paragraph)? A separate text file for each paragraph seems messy, hard to manage. As a relative newcomer to PHP I'm not sure of all the options open to me for simply and quickly parsing a file to return one of many paragraphs.
Ah, a thought just occurred to me. Perhaps I should write a script that generates the MySQL table by parsing a text file, thus allowing me to use an appropriate editor to manage the source text file. Then my website PHP can simply run entirely on the MySQL. Any limitations on the content and length of a varchar table element?
Any suggestions would be much appreciated. What's fastest and simplest? MySQl, or parsing text files?
And it will become easy to handle - to back up, search - and just easier to look after.
Have a search through the mysql docs on mysql dot com about text and blob fields (one is case sensitive).
... well I would if the MySQL documentation was any good. It's appalling. I downloaded the .hlp and .chm versions, and I hate them both. The Windows .hlp system is ugly to start with so I'm not using that, and I'm very disappointed with the .chm version.
The PHP documentation is top-notch - a thorough index and separate pages for every function, etc.
The MySQL documentation, on the other hand, consists of sevaral utterly vast pages, so each index point takes you to the middle of one of these pages, and you can't feel where you are. The style and cross-reference just cut it, either. It's even got black text on a grey background just to make it just that little bit harder to read. Yuk.
1 out of 10. Could do better.
the best documentation is always online [mysql.com] (download and browse-able).
if you would like to have it on your harddisk, then there is only one page per chapter (or all in one page) and that are really bigger documents. db engeneers tend to have machines with lots of ram i think... ;).
nevertheless you can try to mirror the online docs on your harddisk. on windows HTTrack [httrack.com] does a really good job with lots of useable options to download only the manual (windows, open source).
maybe this will lead you to a 'more paged' manual.