View Single Post

   
  #5 (permalink)  
Old 02-28-2008, 10:08 AM
Kevin Day
 
Posts: n/a
Default Re: blocking mysql to read

On Jun 25, 12:37 pm, David Wang <dasn0...@gmail.com> wrote:
> starting a transaction here would not help me as i'm trying to
> disallow a read of that specific row. the only thing that i've seen
> that may work is locking the entire table, but im not sure if that is
> the correct approach. suggestions?
>
> -d
>
> On Jun 25, 11:22 am, Andreas Stieger <Andreas.Stie...@gmx.de> wrote:
>
>
>
> > Hello,

>
> > David Wang <dasn0...@gmail.com> schrieb:

>
> > > Does anyone have some suggestions on how to block one script from
> > > reading the table while the other script is reading the table?

>
> > Do you understand the concept of transactions?

>
> > kind regards,
> > Andreas- Hide quoted text -

>
> - Show quoted text -


It sounds like a table lock (and yes, of course followed by an unlock)
is what you need. If the total time your queries take while the table
is locked is short then it shouldn't be a problem.

Reply With Quote