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.

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

remove trailing slash from array
I have the following array which contains trailing slashes I need to remove. What is the best way to

how to query data from website using VC?
I want to query some datum from a website,so I need a program to read data from a .csv file, and ass

Displaying image from database
Hi,

I've got a site where that's got a database behind it. Currently it has loads of items in

Getting number of affected rows in SQLPLUS..
Hi everyone,
I have a shell script where i am invoking sqlplus, running a query and saving t

Insert to MySQL inside foreach
Hey.
I am parsing some html, and putting inside an html db.
I need to create a randomized inte

Update not working ... please help
Hi,

I am trying to update a row using an edit form by passing id of the row .. but it is not

Inserting 100x and 100y coordinates in mysql table - easy
Is there a way to insert this data into a mysql table named 'map' with the fields: 'x int 3' , 'y in

WORDPRESS - Multiple Loops Only Going to One Post?
I have various pages with multiple loops and i need them to be individual to all other categories.

db entry based on primary key
My "topics" table contains 10 entires
*--------------*
topicid topic
------

The repetition structure: the while statement not working
New programming student, have assignment as follows:
A restaurant has 4 lunch combos for custom

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