NYCPHP Meetup

NYPHP.org

[nycphp-talk] Re: semaphores on Windows

Ophir Prusak ophir at prusak.com
Tue Mar 11 12:32:04 EST 2003


Dan - using the algorithm below, why is there a need to lock the table ?
It'll work fine without table locking.

1. on selects, get the latest 10 from the database on selects (just in case)

2. and after an insert, find the 10th latest entry
3. delete all entries older then what u found in step 2

----- Original Message -----
From: "Analysis & Solutions" <danielc at analysisandsolutions.com>
To: "NYPHP Talk" <talk at nyphp.org>
Sent: Tuesday, March 11, 2003 12:08 PM
Subject: Re: [nycphp-talk] Re: semaphores on Windows


> On Tue, Mar 11, 2003 at 11:40:20AM -0500, Emmanuel. M. Decarie wrote:
> >
> > Yes, this exactly what I want to do. But I was wondering what could
> > happens if 2 clients send a text at the same time. I don't think that
> > its a problem, but I wanted to check here first.
>
> Lock the table.  http://www.mysql.com/doc/en/LOCK_TABLES.html
>
> --Dan
>
> --
>                PHP classes that make web design easier
>     SqlSolution.info  | LayoutSolution.info |  FormSolution.info
>  T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
>  4015 7th Ave #4AJ, Brooklyn NY    v: 718-854-0335   f: 718-854-0409
>
>
> --- Unsubscribe at http://nyphp.org/list/ ---
>
>
>





More information about the talk mailing list