Reply to Re: PHP And SQL UPDATE problem

Your name:

Reply:


Posted by ~=_Slawek_=~ on 02/17/06 21:37

Hello Michael.

Thanks for thinking over my problem. Your 4. assumption is right i cant tell
all other are wrong but I think they are. For my code:

mysql_query("UPDATE liczniki SET value=value+1 WHERE
owner_id='".$this->get_user_id()."' AND
owner_licznik_number='$owner_licznik_number'");

It takes 80ms to a couple of seconds, on shared hosting with DB overloaded
by other users (I assume some kind of write behind caching is responsible
for that). Table size is for now 100 records.

For table structure:
FIELD::TYPE::NULL::KEY::DEFAULT
id::int(10) unsigned::::PRI::NULL::auto_increment
owner_id::int(10) unsigned::YES::MUL::NULL::
owner_user::varchar(255)::YES::MUL::NULL::
owner_licznik_number::int(11) unsigned::::MUL::0::
value::int(10) unsigned::::::0::
type::enum('inny','online','wyswietlen','odwiedzin')::::::inny::
sub_type::enum('tekstowy','graficzny')::::::tekstowy::
style::blob::YES::::NULL::
settings::blob::YES::::NULL::
last_updated::timestamp::YES::::0000-00-00 00

TIA.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация