Can field names be longer than ONE word?
As subject what do I do if I want a field called (for example) Competition ID? I have looked (http://www.mysql.com/doc/C/R/CREATE_TABLE.html) but to no avail. I have tried enclosing it in quotes and 'single quotes' but neither work. Can this be done? Thanks lots David Ayliffe ICQ# 125646758 For the filter: MySQL, Table, Database - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Can field names be longer than ONE word?
At 5:16 PM + 10/30/01, David Ayliffe wrote: As subject what do I do if I want a field called (for example) Competition ID? I have looked (http://www.mysql.com/doc/C/R/CREATE_TABLE.html) but to no avail. I have tried enclosing it in quotes and 'single quotes' but neither work. Can this be done? Check this section instead: http://www.mysql.com/doc/L/e/Legal_names.html You want to use back quotes (`Competition ID`). Thanks lots David Ayliffe ICQ# 125646758 For the filter: MySQL, Table, Database - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Can field names be longer than ONE word?
Hello David! As subject what do I do if I want a field called (for example) Competition ID? I have looked (http://www.mysql.com/doc/C/R/CREATE_TABLE.html) but to no avail. I have tried enclosing it in quotes and 'single quotes' but neither work. Can this be done? Wrong doc. :) Try http://www.mysql.com/doc/L/e/Legal_names.html That says that with a few limitations 'any legal file name' under your OS is fine. But what does 'neither work' mean? Exactly what error do you see at what point in the process? Creating the table? Accessing the table? Do't just type in the error, use copy/paste. Just for fun, try quoting with `backtick.` That's mentioned related to 'special' chars and maybe space is such. Have a :) day! jb ob-filter-words: database sql -- jim barchuk [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Can field names be longer than ONE word?
As subject what do I do if I want a field called (for example) Competition ID? I have looked (http://www.mysql.com/doc/C/R/CREATE_TABLE.html) but to no avail. Section 6.1.2 is probably closer to what you need. I have tried enclosing it in quotes and 'single quotes' but neither work. Can this be done? Try using backticks (`) instead. AFAICT, this should work with MySQL. Using such a naming strategy will also have the added advantage of making your application almost impossible to port in the future... / Carsten -- Carsten H. Pedersen keeper and maintainer of the bitbybit.dk MySQL FAQ http://www.bitbybit.dk/mysqlfaq - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php