Page 1 of 1

Spaces in row names?

Posted: Tue Mar 24, 2009 8:52 pm
by robin105
Is there a big problem with allowing spaces in row names? Will it work on all servers?

Re: Spaces in row names?

Posted: Wed Mar 25, 2009 12:31 am
by sujithtomy
Hello,

You mean spaces in Field-name of tables??

Re: Spaces in row names?

Posted: Wed Mar 25, 2009 12:53 am
by robin105
Mmhm :-).

Re: Spaces in row names?

Posted: Wed Mar 25, 2009 1:10 am
by JAB Creations
I'm going to have to go with a big fat no. I make an exception in XHTML for files intended for downloads but that's about it. Stick to underscores and or dashes. Don't use underscores in URL's though, you should stick to dashes (as dashes as word separators while underscores are not). I'd recommend underscores for word separation for column names. user_avatar and register_date in example.

Re: Spaces in row names?

Posted: Wed Mar 25, 2009 10:39 am
by Bill H
The MySQL docs only say that a space cannot be the last character, but I'm going to echo the "big fat no." I would also echo the use of underscores.

Re: Spaces in row names?

Posted: Wed Mar 25, 2009 12:51 pm
by califdon
I'll join the chorus. Why? Because, even if spaces (or even underscores, for that matter) may be accepted for certain naming purposes in certain software, it's a lethal habit to form because when you migrate to a different environment (and you WILL migrate to a different environment at some point), the habit will cause you unending grief. And for what? There's no good reason to name objects with spaces in them. Thousands of programmers with millions of man-hours of experience have developed many excellent naming conventions that AVOID all these problems. You just need to use them!