• Maurits (cs)

    Ah, I get it! The WTF is that he didn't reimplement HtmlEncode() in a user-defined function.  Right?  ... Right?

  • Chris F (cs)

    I bet he uses his database to send emails too.

  • Kippesoep (cs)

    Hmmm... that's a cool technique. I may want to redesign my content management system. Maybe I can put the stylesheets into the stored procedures, too!

  • scheky (cs) in reply to Kippesoep

    It hurtsssssss usssssss....it hurtssssss ussssssss....

    filthy dbasesssssssss....

     

     

  • Ytram (cs) in reply to Kippesoep
    Kippesoep:
    Hmmm... that's a cool technique. I may want to redesign my content management system. Maybe I can put the stylesheets into the stored procedures, too!


    Why stop there??  You can have javascript stored in the database, and you can also store all of your images as blobs in the database.

    Btw, to the OP, this has been posted before.  You might want to use the search function before posting.
  • Carsten Otto (unregistered) in reply to Ytram

    Ytram, I hate you.

  • Kiriai (unregistered)

    Ytram:
    I am now going to make sure and comment on each WTF you post this week to let you know that you are re-posting an old WTF.

    It was funny when you said it.  But if you are going to actually do it, well that'd be downright annoying.

  • Jake Vinson (cs) in reply to Kiriai
    Anonymous:

    Ytram:
    I am now going to make sure and comment on each WTF you post this week to let you know that you are re-posting an old WTF.

    It was funny when you said it.  But if you are going to actually do it, well that'd be downright annoying.

    Heh, I still thought it was kinda funny.

  • emptyset (cs)

    <FONT face="Courier New" size=2>certain substrings in variable names are classic indicators of Great Programming Skill (tm).  "blob" certainly falls into this category.</FONT>

  • DZ-Jay (cs)
    Jakeypoo:

    And on a personal note, I want to thank everyone for all of the reminders that the WTFs this week are all reposts.  Thanks for keeping me up to date during Classic WTF week.



    WTF?? Wasn't this post before?!

        dZ. :)
  • Tom K (unregistered)

    We paid thousands of dollars for SQL Server, we are going to get our money's worth!

    Thanks for yet another hillarious post.

  • Daniel T (unregistered) in reply to Tom K

    I'm actually kind of impressed :-)  I would have never thought of that...

  • RFlowers (cs)

    You know, the sad thing is this is just the kind of thing that might look impressive to the right (wrong) kind of employer. First, look at the complexity of that query! Second, sqlHtml might look killer on my resume. Take that, XHTML!

  • Free (cs)

    It lets you "optimize" the app server to just use GetRows and GetString to format all the markup.

    Today is "W"...

     

  • DZ-Jay (cs)

    Why they didn't include any JavaScript in there is beyond me.

        dZ.

  • Nunya (unregistered)

    <FONT face=Arial>Dude...</FONT>

    <FONT face=Arial>This was already posted.  WTF???</FONT>

  • mizhi (cs) in reply to Nunya
    Anonymous:

    <font face="Arial">Dude...</font>

    <font face="Arial">This was already posted.  WTF???</font>



    There seems to be a disconcerting number of people on this forum that lack basic reading comprehension skills.
  • BatsShadow (unregistered) in reply to mizhi
    mizhi:
    Anonymous:

    <font face="Arial">Dude...</font>

    <font face="Arial">This was already posted.  WTF???</font>



    There seems to be a disconcerting number of people on this forum that lack basic reading comprehension skills.


    Yes.  Yes there does.
  • Dr. Shim (unregistered) in reply to mizhi
    mizhi:

    There seems to be a disconcerting number of people on this forum that lack basic reading comprehension skills.


    That's scaring me too!

    By the way, that WTF is a repost. Use the search fucntion. ;)

  • Daruku (unregistered) in reply to Dr. Shim

    It totally is a repost!!!! (when does this get annoying?)

  • Mung Kee (cs) in reply to Daruku
    Anonymous:
    It totally is a repost!!!! (when does this get annoying?)

    Yesterday
  • Kazrael (cs) in reply to Daruku

    Yes people should learn to read, as well as use the search function.  BTW this is a repost.  =D

  • Bytecodes is not codebytes (cs)

    This is common. IIS is running 286 and DB-server is running beowulf-cluster.

  • DZ-Jay (cs) in reply to mizhi
    mizhi:
    Anonymous:

    <font face="Arial">Dude...</font>

    <font face="Arial">This was already posted.  WTF???</font>



    There seems to be a disconcerting number of people on this forum that lack basic reading comprehension skills.


    There seems to be a disconcerting number of people on this forum that lack a basic sense of humour.

        dZ.

  • DZ-Jay (cs) in reply to Kazrael
    Kazrael:
    Yes people should learn to read, as well as use the search function.  BTW this is a repost.  =D


    "What is this repost you talk about?"

        dZ.
  • Ytram (cs) in reply to DZ-Jay
    DZ-Jay:


    "What is this repost you talk about?"

        dZ.


    NOOOOOOOOOOO!!!!
  • Fregas (unregistered) in reply to Ytram

    Ytram:
    Kippesoep:
    Hmmm... that's a cool technique. I may want to redesign my content management system. Maybe I can put the stylesheets into the stored procedures, too!


    Why stop there??  You can have javascript stored in the database, and you can also store all of your images as blobs in the database.

    My last job, they almost went that far: they used cursors in stored procedures to generate HTML and I think they actually did email it from there.  Genius!

  • Bytecodes is not codebytes (cs)
    • I for one welcome our new sqlHtml-coding overlords!
  • Mung Kee (cs) in reply to DZ-Jay
    DZ-Jay:
    Kazrael:
    Yes people should learn to read, as well as use the search function.  BTW this is a repost.  =D


    "What is this repost you talk about?"

        dZ.


    This one is funnier every time though.
  • BAnVA (unregistered)

    Steve McConnell's rate just went up $100 an hour.  Coding Horror!

  • Bytecodes is not codebytes (cs)

    Employer: Can you code HTML?

    Employee: No, but I know some SQL!

    Employer: That's what I asked, you retard! get out! NEXT!

  • Hanneth (unregistered) in reply to Kippesoep

    Do I mention that MS SQL Server 2005 is designed to run up to "middle tier" web sites with no IIS intervention? You can used their XML storage type and do selections on nodes in the XML through SQL, as well as embed .Net code in the database and "not have to run a web server."

    scratches his head thinking isn't a program that serves web pages a web server?

  • Rhett (unregistered)

    This guy was probably a PL/SQL Oracle developer who came over to SQL Server or whatever.  Oracle has some packages, HTP and HTF if I recall, for doing exactly this.  They were probably annoyed that their new database didn't have the 'normal' packages, and so decided to do it manually.

  • foxyshadis (cs) in reply to DZ-Jay

    I guess besides being report from hell week, it's also spam week. =D

    The only thing this is missing is a busy-wait loop to test for incoming HTTP connections. I hope the guy gets on it, I'd hate to see the opportunity to have all three layers in a database passed up.

  • WIldpeaks (cs) in reply to Daruku

    All the people complaining about the repost is a wtf in itself, lol

    PS: why read when you can use text-to-speech to mispell for you ? [:D]

  • WIldpeaks (cs) in reply to WIldpeaks

    Or said another way: "brilliant !" [:D]

  • Jochen (unregistered) in reply to Rhett

    This guy was probably a PL/SQL Oracle developer who came over to SQL Server or whatever.  Oracle has some packages, HTP and HTF if I recall, for doing exactly this.

    Not only that, Oracle even invented "HTMLDB" which uses Apache, mod_plsql and the packages you mentioned to generate webpages with database content. As "IDE", you get a web interface where you can put page elements together and back them up with some SQL statements (or click them together, of course). My boss thinks this is a really cool idea because finally you get rid of all those confusing tiers...

  • bugsRus (cs) in reply to WIldpeaks
    WIldpeaks:

    Or said another way: "brilliant !" [:D]



    Should that have not been (in keeping with the reposted content theme)

    <font color="#000099">package</font> test;

    <font color="#000099">public class</font> paulaBean {

    <font color="#000099">private String</font> paula = <font color="#009900">"Brillant"</font>;

    <font color="#000099">public String</font> getPaula() {
    <font color="#000099">return</font> paula;
    }
    }

  • kdd (cs)

     

    Reminds me of a large IT consulting company that implements their 'resuable software framework' in client projects.

    It uses all the latest technologies. It's kind of a write once and no more code changes approach.

    Every attribute of each component in the entire Web UI is stored in a database.(font, x, y, size, page, etc.). Plus workflow, navigation, page layouts, security, etc. also in the same database.

    Want to change that label text in a page -- easy!! Change the value in column x in table y to 'z'.

    Want to add a new button -- add a new row to couple tables!

    See - Nothing is hardcoded. No recompilation. No deployment.

    As Staples says 'That was easy!'

    Don't need any more programmers after the first implementation.

    May also know as the Crazy Extreme programming.

    Yep! the learning curve is a lot of fun.

  • OneFactor (cs) in reply to scheky
    scheky:

    It hurtsssssss usssssss....it hurtssssss ussssssss....

    filthy dbasesssssssss....

    [6] Massssster isssss corrupt. We cannots log in.
    [:'(] No! Massster is good! Massster takes care of us!
    [6] Masssster issss falssssse and tricksssssey. We will take precioussss HTML for ourssssselvessss.
    [:'(] Nooo! It is too risky! Master wants us to log in a different way.
    [6] We could let HER do it...
    [:O] Brillant! Paulab-Ean will take care of Master, and SHE does not want precious, and then WE will have precious HTML.

  • Cristian Berneanu (unregistered) in reply to WIldpeaks

    Don't you mean "brillant"?

  • jeremydwill (cs) in reply to OneFactor
    OneFactor:
    scheky:

    It hurtsssssss usssssss....it hurtssssss ussssssss....

    filthy dbasesssssssss....

    [6] Massssster isssss corrupt. We cannots log in.
    [:'(] No! Massster is good! Massster takes care of us!
    [6] Masssster issss falssssse and tricksssssey. We will take precioussss HTML for ourssssselvessss.
    [:'(] Nooo! It is too risky! Master wants us to log in a different way.
    [6] We could let HER do it...
    [:O] Brillant! Paulab-Ean will take care of Master, and SHE does not want precious, and then WE will have precious HTML.

    Stop it! I am crying, and my co-workers are looking at me funny (well, funnier than usual)[:'(]

  • Doobie Dan (cs) in reply to DZ-Jay

    DZ-Jay:
    Kazrael:
    Yes people should learn to read, as well as use the search function.  BTW this is a repost.  =D


    "What is this repost you talk about?"

        dZ.

    It just keeps getting worse.  Ah, what the hell, I'll join the fun.

    postcount++

  • DZ-Jay (cs) in reply to WIldpeaks
    WIldpeaks:

    Or said another way: "brilliant !" [:D]



    You meant "Brillant!", right?

        dZ.
  • DZ-Jay (cs) in reply to DZ-Jay
    DZ-Jay:
    WIldpeaks:

    Or said another way: "brilliant !" [:D]



    You meant "Brillant!", right?

        dZ.


    Oh, dammit!

    Must... reload... before posting!

        dZ.
  • Blackhawksq (cs) in reply to DZ-Jay

    My first programming job had something like this.

    It was used as a 'Content Manager' allowing Panacore's clients to go in and edit their site 'Without' knowing html... They literally had whole website stored in the webpage, when you connected to this site it would use php to query the database and grab the page you want base on a page name.

    The beauty really came into play when they tutored the clients on how to use it... "Go into word and design the page, click 'Save as html' then view source and copy and paste".

     The interface had all the normal buttons but when you clicked bold you saw <b>text</b>. You had to know html to even read what you put in.


  • Blackhawksq (cs) in reply to Blackhawksq

    "They literally had whole website stored in the webpage" stored in the database... ofcourse it would be the webpage... stupid edit...

  • JThelen (cs) in reply to DZ-Jay
    DZ-Jay:
    DZ-Jay:
    WIldpeaks:

    Or said another way: "brilliant !" [:D]



    You meant "Brillant!", right?

        dZ.


    Oh, dammit!

    Must... reload... before posting!

        dZ.


    Bah, you both got it wrong anyway.  No need to thank me for fixing it..

    Dev1:  I just had a marvelous idea!
    Dev2: Oh? What's that?
    Dev1:  Put the HTML in the SQL!!!
    Dev2:  Put the HTML in the SQL?  BRILLIANT!!



  • diaphanein (unregistered) in reply to emptyset

    emptyset:
    <FONT face="Courier New" size=2>certain substrings in variable names are classic indicators of Great Programming Skill (tm).  "blob" certainly falls into this category.</FONT>

    "blob" is actually a datatype in some DBMSes.  So is "CLOB" and "GLOB". These are large objects.  FileBlob actually makes a fair amount of sense.

    I love how people mock that which they do not understand.  There is a very simple reason for doing this.  Performance.  Yes, its harder to maintain, yes it abuses the database, but it can be significantly faster.  In old data-driven ASP pages, I used this technique a fair amount.  Not nearly to this degree, but I used it.  To save iterating in an interepretted language on my slow ASP host (I'm talking a dual 200 Mhz Pentium Pro), I used my mainframe DBMS host to generate some of my html.

    Response time to client before:  30s.  Response time after the change:  <1s.

  • i am funny (unregistered) in reply to DZ-Jay
    DZ-Jay:

    There seems to be a disconcerting number of people on this forum that lack basic reading comprehension skills.
    what

Leave a comment on “SqlHtml”

Log In or post as a guest

Replying to comment #:

« Return to Article