[Gllug] MySql problem...

Jason Clifford jason at ukpost.com
Wed May 21 11:55:52 UTC 2003


On Tue, 20 May 2003, Kristian Davies wrote:

> I have managed to get mysql up and running and I have created a few
> tables... But.... I seem to have done something I shouldn't and it seems to
> have let me..
> 
> I have created a field within a table with a dot in it. i.e.. Within Table
> "users" a field called "user.name" instead of "user_name" 
> 
> When I open the table for edit, it allows me to press delete and it
> disappears but then when I try an exit I get "[MyHost] ERROR 1091: Can't
> DROP 'name'. Check that column/key exists" and thus it wont let me save.  I
> have also tried a few things from the command line which more or less give
> the same error.

Where you have created a field with a name that does not fit with standard 
mysql clients due to an invalid character you need to quote the field in 
all query statements.

You do this like so, using backticks to quote the invalid field:

select `user.name` from table where condition = 'whatever';

Jason Clifford
-- 
UKFSN.ORG		Finance Free Software while you surf the 'net
http://www.ukfsn.org/			Sign up now
UKPOST.COM	 	           get your @ukpost.com address now...
http://www.ukpost.com/	 	   professional hosting and colocation



-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list