Table Locking?
Posted: Tue Jan 27, 2004 11:36 am
I am doing an insert into a table. I need to lock the table before I do this insert so no one else can write to it while I am. how would I do this?
// This does an insert into the events table
$query = "INSERT INTO events (house,type,event_date,event_timestamp) ";
$query .= "VALUES ($event[FacId],4,'$event_date','$event[EventStartDateTime]');";
$result = pg_exec($con,$query);
// This does an insert into the events table
$query = "INSERT INTO events (house,type,event_date,event_timestamp) ";
$query .= "VALUES ($event[FacId],4,'$event_date','$event[EventStartDateTime]');";
$result = pg_exec($con,$query);