KBD

Keith Devens .com

Saturday, August 30, 2008 Flag waving
Life moves pretty fast. If you don't stop and look around once in a while, you could miss it.... – Ferris Bueller

Archive: March 05, 2002

← March 04, 2002March 06, 2002 →

Daily link icon Tuesday, March 5, 2002

What to name the MySQL dolphin? Out of all the names suggested, I'd probably go for echo, in a homage to the language that has most affected MySQL's popularity.

See, this is exactly why I resisted putting comments on my site for awhile: you lose some editorial control. I haven't even had comments on my site for 24 hours, and I'm getting someone advertising his own site. The comment is completely unrelated to the post.

You'll see... once I code an administration interface, you're all dead.

The day after making my new comments feature, I wake up to find a lot of comments posted. That's awesome, I feel loved.

Features to add:

  • remember to stripslashes (I really hate magic quotes) (done)
  • remember name, email, and website values in a cookie (done)... did you know that PHP does magic quotes on cookie values?! Pain in the butt. Very possibly PHP's worst thought out feature.
  • get the comment count to work on my main weblog. Ha! Did it! MySQL doesn't support sub-selects, so it was a pain in the ass, but I got it.
  • fix up the style a little
  • use my markup parser, or at least nl2br and htmlspecialchars. (nl2br and htmlspecialchars done)
  • Make some way to edit comments. This might be more trouble than it's worth, but it would be neat for anyone to be able to correct typos (I've already made some)
  • be able to point to a specific comment. I can do it with an anchor link on the url, and I can also be cool and highlight that post a special color to make it more obvious. Update, turns out this can't be done with an anchor link, since that part of the url isn't even sent to the server. Boo.
  • code an administration interface so that I can delete inappropriate comments.
  • Make something available so that you can choose to be e-mailed whenever there is an update to a post you commented on, or when someone adds a comment. (Just like a real discussion board Smiley

Anything else? Feel free to leave suggestions. Hah!

Also, I just wanted to say thanks to Charles, whose comments feature I looked to as a starting point for my own. I still want to know how he gets a comment count with every post on his main page. MySQL is rejecting my SQL when I try to do it how I would with other RDBMS. If anyone can tell me how to do a count(*) along with a left join in MySQL, or any other way to do it without doing a separate query for each post, I'd appreciate it.

Update, just heard from Charles. I had sent him an e-mail last night asking him that question. Here's his response (hope he doesn't mind me quoting him): "Easy -- I don't do a database query at all! Our site uses flat files, no database. The number of comments is stored in a field in the entry's data file." lol, I never guessed.

I've decided to try adding comments to my weblog. I purposely didn't elaborate on this post because I think it'd be interesting to get comments from people. Too bad I won't be finished with the comments feature tonight.

Ok, I'm trying to get joins with MySQL to work right...

Alrighty, anyway, comments are in place and you can have fun with them. The only problem is that I have no indication of that here on my home page. Click on the chain link icon to go to an individual weblog entry with its comments.

Ok, I put a little comments link, just without a count Smiley

I hate this kind of racism.

I hate not being able to sleep.

I just noticed Buy.com redesigned their website. It looks good. When did that happen?

← March 04, 2002March 06, 2002 →
August 2008
SunMonTueWedThuFriSat
 12
3456789
10111213141516
17181920212223
24252627282930
31 



RSS feed RSS feed for Keith's Weblog
Atom feed Atom feed for Keith's Weblog
Weblog archive
Recent comments
  on 2 posts

Recent comments XML

new⇒Johnny Walker Blue Label

Wow, thanks for the scotch review​:D

Lagavulin and Laphroaig are​some of...

Keith: Aug 29, 3:35pm

Girls, please don't get breast implants

Wow, After all this time, the​comments on this page continue to​grow. It wa...

Ajeet: Aug 25, 2:36am

Generated in about 0.065s.

(Used 7 db queries)

mobile phone