Re: Trying to build a database driven website



doznot wrote:
Jerry Stuckle wrote:
And the other errors in your statements are just too numerous to even mention.


OK, we'll try an experiment here. I'll assume a totally subservient position. I made a terrible mistake by making representations of any kind. Instead I'll as you, the acknowledged expert, a few questions:

1)
Is it true that many "database driven websites" use text blocks
for storing html fragments, that might, for instance, be used to
fill the contents of a table-td or div? (perhaps not, I'm asking, you are the expert).


A database is a ubiquitous tool. What I think the OP wants is to retrieve data about the library and display it. As such you just store data in the database, you don't format it until you write the page. Usually this is a complete block of html, a whole table or some such. What data you bring back will be driven by the sql and generally formatted one row at a time, but all rows will be formatted using the same rules.

Now as far as CMS's, usually you are also writing large blocks of html, not just a bit here and a bit there. And you know exactly where it is going.


2) if the answer to question 1 is no, then there is no point in
reading further. That would mean I was off base and completely wrong.
But if so, and if those html fragments needed updating, then a query
would have to be written...perhaps a "if table_name.fragment_name like '%pattern%'

Such stuff is usually locked in the template. You should never have to do a sitewide search and replacement. If you are making sites like this you have a maintenance nightmare. Don't do that.

Jeff


.....then use a search and replace mechanism
to replace, and then update. Sure that's possible, but it's a bit
awkward isn't it? compared to two line recursive perl replace?

Please give an example, rather than vague and aggressive assertions.
.



Relevant Pages

  • Re: Trying to build a database driven website
    ... Jerry Stuckle wrote: ... I never said a files-based system was "better than" anything. ... database, that makes particular sense in the small site context. ... Html fragments will contain small sub-strings that periodically need to be changed. ...
    (comp.lang.php)
  • Re: Trying to build a database driven website
    ... However, you (Jerry) have ... database, that makes particular sense in the small site context. ... Or perhaps said html fragments are known to contain references Joe Blow ...
    (comp.lang.php)
  • Re: Trying to build a database driven website
    ... I made a terrible mistake by making representations of any kind. ... Instead I'll as you, the acknowledged expert, a few questions: ... But if so, and if those html fragments needed updating, then a query ...
    (comp.lang.php)
  • Re: Trying to build a database driven website
    ... Good work Jerry. ... Database-driven sites don'tstore HTML fragments, ... More likely you used an application which accessed an Oracle database and never have done any database programming. ...
    (comp.lang.php)
  • Re: Trying to build a database driven website
    ... Good work Jerry. ... Database-driven sites don'tstore HTML fragments, ... More likely you used an application which accessed an Oracle database ...
    (comp.lang.php)