Skip to main content
4 of 13
edited title

Error saving an edit in a custom componen t`mytable_users` was not locked with LOCK TABLES`

I'm getting an error as trying to save edits in my custom component.

I have another edit.php that works just well.

I identified that the problem lies in the table file, especifically in the function check();

When i have the function in my table file, whenever i save the edit, it gives me an SQL error:

`mytable_users` was not locked with LOCK TABLES`

when i take the function out, it gives me different error (The weirdest part is that even with the function not being there, it still says the function name):

> Error Save failed with the following error: Invalid `parent_id` [0] in
> PrefixNameTableTableName::check()

the problem is that i don't need parent_id. How can i solve it?


I get the same error

mytable_users was not locked with LOCK TABLES`

when i try to add a parent_id field in the xml file related to the edit.php file.