Archive: March 05, 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

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 
I hate not being able to sleep.
I just noticed Buy.com redesigned their website. It looks good. When did that happen?
|
Generated in about 0.093s. (Used 7 db queries) |
new⇒Maps of Iraq
my husband is in Scania too..hesays it's not too bad..he's been atworse...
Cristy: May 16, 3:54pm