![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, What I am trying to do: CREATE TABLE IF NOT EXISTS profilename(profilename VARCHAR(255) UNIQUE, INDEX(profilename), email VARCHAR(255), INDEX(email)); LOCK TABLES profilename WRITE; INSERT INTO profilename (profilename,email) SELECT concat('user',count(*)+1),'my (AT) email (DOT) com' from profilename; ERROR 1100 (HY000): Table 'profilename' was not locked with LOCK TABLES So from searching the web for that error code I think you are suppose to use: LOCK TABLES profilename AS x WRITE; Then use x in the query somehow? I really don't understand how this is suppose to be so the locking works and one don't get the error. This is based on what I saw in another thread, but it did not provide me with enough information to figure this out. Thanks for any help, Regards Jon Berg. |
![]() |
| Thread Tools | |
| Display Modes | |
| |