MyBB Community Forums

Full Version: Lock table
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
How to lock some table in database so nothing can be written in that table?
example subs table...
DO not lock any mybb table,. And if you do not want to lock mybb table than i guess this is not the right place to ask.

Your Solution :- Wrote:LOCK TABLE <tbl_name> READ;
Above Statement will Lock table but connection can still be made only for read.

EDIT: And Also, Please mark thread as solved, when you done.
I need to lock subscriber table so nothing can be written in that table, so no one can subscribe. Is it good idea?
Um, no it's not, surely you could just remove the ability to subscribe from the site itself?? That would surely be a far more obvious solution, otherwise people will probably just get errors when they try and subscribe... if you want to stop people doing something, just remove the ability for them to do it in the first place, not let them do it but lock the table to stop it being inserted.
Can you tell me how to remove ability to subscribe? Problem is when someone post something automaticly he subscribed to that thread -.-
(2011-12-18, 04:04 PM)Duga Wrote: [ -> ]Can you tell me how to remove ability to subscribe? Problem is when someone post something automaticly he subscribed to that thread -.-

alter the usercp templates to not show the subscription mode and when you post the data to the table ensure the variable is set to the correct value there is a thread on this site regarding a simular issue try here
I done everything and still when someone post or make thread in user cp options under Subscribed Threads there is a threads where did he/she posted or his/her thread -.-
^ can you check if they are instant email notification type OR no email notification type ...
the SQL Query suggested earlier was for "no email subscription" ; it was selected for easy
reference to members' replied threads ( they are enlisted for members' own convenience ) ...
All member are instant email notification ... If you mean on when they register does they need to check mail etc..
run below SQL query & observe how many rows are affected ..
UPDATE `mybb_users` SET `subscriptionmethod` = '1' WHERE `subscriptionmethod` = '2';
Pages: 1 2