Spaces in MySQL Table Names

2007/07/12 00:37:00

I’ve been playing with databases a bit lately for a small file tagging project I’m working on at home. My muse has inspired me to investigate cataloging methods and my files seemed to be a good start. More updates on this as it continues to grow.

Many of you probably know this, but I couldn’t seem to find it on the Net. I was probably searching on the wrong thing, but wanted to make sure I helped out all of the other MySQL users out there.

I created some tables using the gui from OpenOffice.org Base and put spaces into the table names. Surprising to me, it was ok with the spaces. When I tried using the mysql command line client later, I found that I couldn’t figure out how to reference them.

Yes, Virginia, you can have spaces in your database table names. This is how you referenced them:

SELECT * FROM `My Table`

Those special characters there are not apostrophes (‘), but backticks (`). Slight difference. The symbol is on the same key as the tilde (~) on your keyboard.

In theory the ` should also work for fields with spaces in them too.

Supposedly Microsoft SQL Server uses brackets ([]) to handle tables and fields with spaces in them, but MySQL does not seem to follow this convention. I hadn’t checked Oracle, Sybase, or PostgreSQL.

And, now I’ve been bad and stayed up too late again. G’night folks!

Life is returning to normal?

2007/07/10 14:25:00

Where’s the fun in normal?

I’m home sick today. Another doctor’s visit. If anyone wants to know, I’ll email you with what’s up. Thank you all for your support during this painful time.

The ladyfriend and I went to Baltimore where we checked out the aquarium. Pics are here. You should check them out. I’m getting better.

I’m not going to make it to Otakon this year. She’s taking me to a Dave Matthews concert and I don’t know if I can afford this much traveling. Sorry folks.

On the home front, Koneko has moved out. I’m sad now. She’s not around. Even though she didn’t do much with me while she was here, at least the company was nice. I’ve got the freedom to cook naked (like Joey on Friends), but I can’t help but want to bug someone occasionally. The cats are only marginally interesting.

I’m glad I’ve got a new friend to bring over and bug. B)

On the other hand, I can finally get down to business with some things I want to do to the house with impunity. Also, it’s nice to be able to browse porn^W^W enjoy some alone time.

Next week is CISSP training. The test promises to be quite difficult and I’m not sure if I’m up for this, but we’ll give it a shot. I should really review the books before the class!

Speaking of books, I’m still making my way through my Ruby on Rails book. Eventually my plan is to redo this entire site in rails, giving me the control I want. I have to say, though, b2evolution and gallery have been meeting my needs quite nicely.

I haven’t talked to Sigje lately and think I should give her an email/call/etc.

Oh, and the solution for Spamassassin didn’t work. I’ve put the following into my local.cf file:

trusted_networks 72.36.174.35 127.0.0.1

Wish me luck. Hopefully this will force it to just accept anything from itself without checking it. The fact that SPAM URLs were in the log emails was tripping it, but then again, these SPAM URLs are what the log emails are reporting. Sheesh. This wasn’t an issue on the previous version of CentOS.

I really miss my girlfriend. I really need to ask her what name to give her on the blog. I could pick, but I don’t want to be mean.