"Thank God for me."
-- Rush Limbaugh

Inheriting a database

1.
database.SetQuery("select *\n from " + TABLE);

\n in the middle of a simple select * query? That’s just weird, man.

(Besides that it’s not particularly good form to use select * in the first place. Although it’s not good form on my part for not responding to most of your comments–will do tonight.)

2.

> now, what did you say was holding you up from declaring a
> proper datetime datatype?

I have inherited the database. Unfortunately because the date field is
of type varchar, there exist some incorrect dates, so I need to clean up
the data….You will feel a slight shift in the Force when I have rectified the
datatype error.

I’m in this situation! Except I don’t have time to make all the necessary changes to the code. It would be much appreciated to withhold any snide comments such as, “The real WTF is that you’re using MySQL.”

(Quote from [thelist] MySQL Convert String To Date)

June 18th, 2008 6 comments
Posted by Donnie Filed under Computer-fu

  1. Tacticus Maximus posted the following on 18 June 2008 at 5:15 pm.

    Refactored from:

    database.SetQuery(“select *”
    + ” from ” + TABLE);

    ?? :)

        Reply to Tacticus Maximus
  2. Allen posted the following on 18 June 2008 at 7:59 pm.

    I think someone just literally saw this:

    select *
    from table

    and thought hey, i should keep that formatting in place. *shrugs*

        Reply to Allen
  3. Donnie posted the following on 18 June 2008 at 10:20 pm.

    @Tacticus: Exactly, but that’s a situation where I prefer StringBuilder.

    @Allen: And the initials of that someone are…DB.

        Reply to Donnie
  4. wang posted the following on 19 June 2008 at 11:22 am.

    Hey Donnie, how about noon my time on Saturday? That would be 2PM your time?

        Reply to wang
  5. Allen posted the following on 19 June 2008 at 7:42 pm.

    Lots of people have the initials of DB.

        Reply to Allen
  6. Donnie posted the following on 19 June 2008 at 10:29 pm.

    @Wang: Sounds good to me!

    @Allen: It’s perfect cover in case DB ever stumbles on this site,.

        Reply to Donnie

Leave a reply