Simultaneous select/update/insert


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

Hi

How would I need to go about when 2 users update a single row simultaneous? And how would I need to go about when 2 users want to edit a row?

Did you know?Explore Trending and Topic pages for more stories like this.
Should I first lock the table, update the row to indicate who is editing the data unlocking the table and selecting the row where the editor_id = the current user_id? Plus what happens when I lock the table do other users get a failed query? and what errno does mysql return in this case?

Do I need to use not null on required fields or should I leave it out?
No comments posted yet

Your Answer:

Login to answer
316 Like 54 Dislike
Previous forums Next forums
Other forums

What exactly is net neatrality?
What exactly is it? I think it's anti-censorship and... stuff... but I don't really understand it

MS are the best!!!
Visit http://www.microsoft.com/australia/windows/default.aspx?h=watch-a-demo and click the massive '

calculator
I can't figure out why this code doesn't work. No error messages. Page loads.

Code: <

mysql select query problem
how can i select multiple fields from multiple table in one query like

i have table name t1 a

Typing math
I've added support for typesetting math using LaTeX on the forums.

Example:
Code: [Select]

Shuffle Array
Hi,

I am writing a script for a game that needs players to randomly be assigned a target (ano

PHP submit form script causing blank page
Im trying to submit a form using this script, however nothing shows up on the page, does anyone know

Check before inserting in DB ???
This is my code
---------------
if ( $_POST ['Submit'])
{{
$username = $_POST ['usernm

Captcha problem users just refresh and it will let them auto submit again
Users will just re submit and not have to enter the new captcha.. ? Lol but if i refresh the page, t

problem with GROUP BY and ORDER BY
i usually use this query to display the last 10 entries from a sql table:

Code: $query = &quo

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