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

SHOW TABLES Help
Hi all

I have the following

Code: [Select]<?php
$sql = "SHOW TABLES&quo

Hits this week counter
I have a counter on my site that tracks hits, IP's, etc. into a mySQL database. It also includes the

Creating XML with php
I need to creat an XML with php and have successfully produced a valid output.
The problem I hav

Take info from one coloum and move to another
Hi all,

I have this:
Code: [Select]$array = "SELECT stock_id FROM stocks WHERE stock_

newbie question
Hi out thereIm totaly new in this forum and to .net and vb so here is a totaly newbie question.I wan

Get word number x from string?
How can I use a function to loop through a string, and "have a look at" every word in the

How to form a xml form table with a single sql statement..?
Hi everyone,
I don't know if this is going to be a duplicate thread but i couldn't

ctype() validation - allowing illegal characters
Hello,
I use ctype() to filter and validate a user form. However, I am trying to allow certain c

show the direct link into href
I want to display link on the page. i am fetching the data(URL) from database,actually before that i

Error in write byte array into document in SM58
Hi Gurus,

Getting the following error status in Transactional RFC (SM58) ..... *Error i

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