You are here: Re: parallel interpreter/db problem. transaction didn't fix. « PHP Programming Language « IT news, forums, messages
Re: parallel interpreter/db problem. transaction didn't fix.

Posted by Jerry Stuckle on 04/24/06 15:17

Jim Michaels wrote:
>
>
> well, adding the transaction didn't affect *anything*. so I'm thinking
> wrong somewhere.
> my guess was that instance B and instance A had both read the same value at
> nearly the same time, UPDATEd with the same value as a result. a race
> condition. I had *thought* a transaction would fix that, but obviously
> there's something about transactions I don't understand. I couldn't get
> table locking (counter READ) to work - it just gave me invalid resource
> errors down the line on my queries. I've never used table locking in PHP
> code before.
> If I could get table locking going, maybe that would be the fix to my
> problem.
>

Invalid resource errors should never occur. They mean you're getting an error
on your queries - and not checking for them.

Always check the results of MySQL queries! NEVER ASSUME THEY WORK!

And when you do check the result, what do you get?

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

 

Navigation:

[Reply to this 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

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