View Single Post

   
  #4 (permalink)  
Old 02-28-2008, 11:29 AM
Peter H. Coffin
 
Posts: n/a
Default Re: CREATE TABLE with 'table' and 'field' as Key names

On Fri, 02 Nov 2007 13:30:07 -0500, Good Man wrote:
> Good Man <heyho@letsgo.com> wrote in
> news:Xns99DC933AB6A4Bsonicyouth@216.196.97.131:
>
>> Darek <darek@nowhere.nohow> wrote in
>> news:fgflrf0205o@news1.newsguy.com:
>>
>>
>>> This database is for a hosted site, so I don't know if the key names
>>> are required, and I'm not really in a position to start renaming
>>> them.
>>>
>>> The same error pops up when I try the insert on 3.23.49 and I got
>>> this CREATE syntax from mysqldump, using '-c -a', '-c', '-a' and no
>>> switch at all.
>>>
>>> What can I do to troubleshoot this further?

>>
>> Well, no point in troubleshooting it further because you know the
>> problem: MySQL has "Reserved Words" that your database is using.
>> You'll have to change your database.
>>
>> http://dev.mysql.com/doc/refman/5.0/...ved-words.html

>
> Actually according to that doc it suggests that you may use reserved
> words if they are quoted properly:


Note that "may" doesn't mean the practice is recommendable. Odds are
that doing so will bite the programmer eventually, somehow.

Been there, still have teethmarks.

--
28. My pet monster will be kept in a secure cage from which it cannot escape
and into which I could not accidentally stumble.
--Peter Anspach's list of things to do as an Evil Overlord
Reply With Quote