> I'm going to have a php web form that potentially many users will use to
> insert into a MYSQL DB, maybe they will try at the same time. Do I have
> to lock the tables that are being populated?

You can use inserts, updates and selects without locking tables as long as
you don't need the table to remain constant between two queries.

Locking tables is useful for e.g.
- select the information you need
- do some extra calculations
- update the records you have previously selected
There are situations where you want to be certain that between the first and
the third step no information was altered in one or more tables.

With all the variations in syntax for inserts and updates (multi table
updates, insert...select, etc.) you will need table locks rarely.

Regards, Jigal.


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to