On Sat, 2002-11-09 at 19:34, 3mip1s4la-Emilio Pisanty wrote:
>
> > > tables have met with a 1175 error ("You are using safe update mode and you
> > > tried to update a table without a WHERE that uses a KEY column").
> > Nothing is obvious and is hard to advise you if you don't give us some more
> > info on the table structure and the update query you have trouble with.
> >
> > /h
>
> ok. thable structure is this:
> mysql> describe pupils;
> +----------+-------------+------+-----+---------+-------+
> | Field | Type | Null | Key | Default | Extra |
> +----------+-------------+------+-----+---------+-------+
> | name | varchar(20) | YES | | NULL | |
> | surname | varchar(20) | YES | | NULL | |
> | surname2 | varchar(20) | YES | | NULL | |
> | form | char(3) | YES | | NULL | |
> | tutor | varchar(20) | YES | | NULL | |
> | sex | char(1) | YES | | NULL | |
> | birth | date | YES | | NULL | |
> | math | char(3) | YES | | NULL | |
> | optA | char(3) | YES | | NULL | |
> | optB | char(3) | YES | | NULL | |
> +----------+-------------+------+-----+---------+-------+
> 10 rows in set (0.00 sec)
>
> it was built in version 3.23, and we recently updated to 4.0.4 beta.
>
> the query I'm running is
>
> mysql> UPDATE pupuils SET tutor = 'URIOSTEGUI' WHERE group = 'U6U';
> (setting the name of the tutor for Upper 6)
>
> and I meet with:
> ERROR 1175: You are using safe update mode and you tried to update a table
> without a WHERE that uses a KEY column
>
> I don't quite understand what a "KEY column" is, can someone explain it to
> me? if you can't answer, where can I find error listings? because they
> don't appear to be on the site.
>
> hope this helps you help me...
well a couple of things I see.
1. you have no group in field so it can't compare U6U to anything.
2. I don't think you can use a field name group anyway since group is
reserved in mysql
3. you have no key in your table therefore you can't do a conditional
statement ("where") to compare it to.
Error 1175 is the error that was reported to you.
You are using safe update mode and you tried to update a table
without a WHERE that uses a KEY column
---------------------------------------------------------------------
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