Locking mysql tables with php


Posted on 16th Feb 2014 07:03 pm by admin

Hi

BACKGROUND:
I have multiple instances of the same php script running in a WAMP environment. The script contains mysql queries to lock certain tables in the database. I'm getting some very odd behaviour which would seem to suggest that the locks are not working, and that one instance of the script is reading from a table that another instance of the script should have a write lock on.
Did you know?Explore Trending and Topic pages for more stories like this.

ACTUAL QUESTION:
Do two instances of the same php script running through WAMP get totally independent locks on tables in a database?

I didn't post this question in the mysql forum because although it is about locking tables, it is about locking tables from the point of view of a php script. Please move it if I have posted in the wrong forum.

Cheers

Paul
No comments posted yet

Your Answer:

Login to answer
348 Like 52 Dislike
Previous forums Next forums
Other forums

php or sql?
Sorry not sure if this is a sql problem or php the following code is supposed to delete data from th

How to ask a regex question?
Hi, I thought I'd share some of my insight after seeing too many bad questions that either get ignor

How do I get the row number from from an sql table query
Hi all

I have a table that I query and it returns a number of rows.
mysql_num_rows($query)

Required to login help
I'm trying to set up my site so users have to be logged into the forum to access the site.I've been

Unifying logins of two different scripts
I have two different game scripts which I want to embed on my own site. The problem is I don't want

Can php detect connection speed and thereafter swap out elements?
No code to post, lads, yet. Just looking for a yay or nay at this stage:

Can a php script be

media recovery
Hi,
i startup the database i got the error

SQL> startup
ORACLE instance started.

insert Multiple rows into the table from that table data
Hi All,

I have a requirement like to insert mulitple rows into the table from that

Basic Question Regarding PHP Includes
Hi

Just starting out with PHP.

Working on a site that uses some basic includes, these

Problem with creating FI documents
Hi, Experts!

when i create Fi doc. with standart transaction, i ve been had such problem

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash