# [EMAIL PROTECTED] / 2003-06-29 23:24:58 -0500:
>
> > # [EMAIL PROTECTED] / 2003-06-29 13:09:03 -0500:
> > > CREATE TABLE extraFieldOptions (
> > > fieldID tinyint(3) unsigned NOT NULL default '0',
> > > fieldOption varchar(16) NOT NULL default '',
> > > fieldValue varchar(16) NOT NULL default '',
> > > PRIMARY KEY (fieldID,fieldOption)
> > > ) TYPE=MyISAM;
> >
> > > mysql> update extraFieldOptions set fieldValue = 'horizontal' where fieldID
> >
> > > = '2' and fieldOption = 'alignment';
> > > Query OK, 0 rows affected (0.00 sec)
> > > Rows matched: 1 Changed: 0 Warnings: 0
> > >
> > > MySQL doesn't produce an error.. but I think maybe it's the 'and' in
> > > my where clause that isn't working. I have looked high and low for an
> > > example of such a query but cannot find anything. Any help would be
> > > greatly appreciated. Thanks.
> >
> > what was the value of fieldValue prior to the update?
>
> fieldValue is "vertical" before the update.
Hmm, strange. I would bet that's not the case...
CREATE TABLE extraFieldOptions (
fieldID tinyint(3) unsigned NOT NULL default '0',
fieldOption varchar(16) NOT NULL default '',
fieldValue varchar(16) NOT NULL default '',
PRIMARY KEY (fieldID,fieldOption)
) TYPE=MyISAM;
Query OK, 0 rows affected (0.09 sec)
INSERT extraFieldOptions
VALUES (2, 'alignment', 'vertical');
Query OK, 1 row affected (0.05 sec)
UPDATE extraFieldOptions
SET fieldValue = 'horizontal'
WHERE fieldID = 2
AND fieldOption = 'alignment';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0
SELECT * FROM extraFieldOptions;
+---------+-------------+------------+
| fieldID | fieldOption | fieldValue |
+---------+-------------+------------+
| 2 | alignment | horizontal |
+---------+-------------+------------+
1 row in set (0.00 sec)
UPDATE extraFieldOptions
SET fieldValue = 'horizontal'
WHERE fieldID = 2
AND fieldOption = 'alignment';
Query OK, 0 rows affected (0.00 sec)
Rows matched: 1 Changed: 0 Warnings: 0
As you can see, what you see is MySQL's (documented) behavior in
response to a noop update. I don't know what could be causing this
otherwise.
--
If you cc me or remove the list(s) completely I'll most likely ignore
your message. see http://www.eyrie.org./~eagle/faqs/questions.html
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]