Here's a question...I'm storing news stories in a MySQL database. These stories are searchable by date, subject, category, keywords, etc. Well we are adding an option to send the article via e-mail to yourself or a friend. The company wants to be able to send an HTML link instead of just having the story in the e-mail.
Everytime a new story enters the database, should we just go ahead and produce it to a txt HTML file as well and call it "UniqueID.html". Otherwise, the server would just get cluttered with pages from old old searches. Would it still be better to generate them on the fly instead of creating an HTML page for every article at the time they enter the database?
In Database - to HTML
Moderator: General Moderators
I'm not sure exactally what your asking but this is what i do for articles:
I use the switch() function that switches between the variable $article, and the case's are the article IDs from the database. The multiple case rows will be called by the while() loop from the database.
This saves alot of web space for pages. It's just a simple page like:
http://www.yoursite.com/articles/?article=974
Hope i helped!
I use the switch() function that switches between the variable $article, and the case's are the article IDs from the database. The multiple case rows will be called by the while() loop from the database.
This saves alot of web space for pages. It's just a simple page like:
http://www.yoursite.com/articles/?article=974
Hope i helped!