problems with updates via php
hey there..
i got a very strange problem and was wondering if any1 has expierienced the same or has some possible solution in mind:
i do some update after each other via php on a table like this :
CREATE TABLE `t_plaetze` (
`id` bigint(20) NOT NULL auto_increment,
`sektion` tinyint(3) default NULL,
`reihe` tinyint(3) default NULL,
`platz` smallint(5) default NULL,
`cat` tinyint(3) default NULL,
`stat` char(1) NOT NULL default '0',
`auffuehrung` datetime default NULL,
`stueck` varchar(255) default NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `sektion` (`sektion`,`reihe`,`platz`,`stueck`)
) TYPE=MyISAM ROW_FORMAT=DYNAMIC
what i do is :
UPDATE t_plaetze set stat=NOT(stat) WHERE sektion='1' AND reihe='2' AND auffuehrung='2005-06-30 21:00:00'
this should set the field stat from its original value (either 1 or 0) to 0 or 1.
so far so good - this query works and doesnt give any errors...
BUT when i send 10 or 15 querys via php within a time of lets say 15 sec some of the querys dont work correct - the stat value doesnt get updated!
and this although:
1) if i add a timestamp field to the table and update this one too it gets set correct
2) mysql_affected_rows() always outputs the correct values
3) mysql_query() is true
so... the query reaches the server just the data doesnt get updated correctly.
this problem doesnt occur if i use set stat='0' or ='1' but occurs with each method
i can imagine where stat is used to redefine stat (linke stat=1-stat, stat=mod(stat+1/2), stat=NOT(stat) etc.)
i am not really sure what happens here and why this problem occurs only sometimes but i think that some of the querys get partly "overwritten" by the following ones ...
if any1 got an idea pls post, i would appreciate any help.
thx stefan
Subject
Written By
Posted
problems with updates via php
September 04, 2004 06:52AM
September 04, 2004 09:42AM
September 04, 2004 09:57AM
September 04, 2004 10:04AM
September 04, 2004 10:14AM
September 04, 2004 11:48AM
September 04, 2004 11:57AM
September 06, 2004 09:11AM
September 06, 2004 09:23AM
September 06, 2004 10:24AM
September 06, 2004 10:46AM
September 07, 2004 01:58AM
September 08, 2004 09:10AM
September 04, 2004 11:51AM
September 04, 2004 11:59AM