Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

How do I run a sql query?

  • 25-08-2009 6:21pm
    #1
    Moderators, Motoring & Transport Moderators, Music Moderators Posts: 12,781 Mod ✭✭✭✭


    I have just set up a phpbb forum. By default, the users are not notified of replies to their posts etc. I read this this thread how to change the default in future, but I want to make sure any users who are already registered, it gets changed for them too.
    I believe you will have to change the default value of user_notify in the database to 1 and also change it for all existing users with this SQL:

    UPDATE phpbb_users SET user_notify = 1 WHERE user_id > 1;

    I already changed it so that all future registrants have it by default, changed 0 to 1 in the code, but as it says above this SQL query will do it for all existing ones.
    Now to make it work you also have to change your database setting from: 0 to 1.

    To do that, go into your phpAdmin and click the database field on the left side called (phpbb_users) near the bottom.

    You should now be shown a new page that list loads of setting that you can put a TICK in a box on the left. Find the one called (user_notify) and put a tick in the box, and then click the "PENCIL" icon on the right of it (on the same line) to edit it.

    Now in the box called (Default2), which is above the (extra) box, change the number from 0 to 1and save it.

    Thats it!

    I cannot find the "phpbb_users" mentioned above. Kinda lost as to what to do now...

    Can anyone tell me how to do this?
    Thanks


Comments

  • Registered Users, Registered Users 2 Posts: 9,579 ✭✭✭Webmonkey


    Have you got phpmyadmin on it? (It usually comes with most hosts - in the control panel). It should be easy spot the database to select. It usually has a random name.


  • Moderators, Motoring & Transport Moderators, Music Moderators Posts: 12,781 Mod ✭✭✭✭Zascar


    Yes its PHPmyadmin. Actually looking now I think I know which DB it is (sorry edited above post just before I saw this) but still can't find the "phpbb_users"


  • Registered Users, Registered Users 2 Posts: 9,579 ✭✭✭Webmonkey


    IIRC, when you install phpbb, there is usually a table prefix. In the case above it is phpbb_ - you might have something else or perhaps maybe nothing. Could be just users.


  • Moderators, Motoring & Transport Moderators, Music Moderators Posts: 12,781 Mod ✭✭✭✭Zascar


    Ahhhhhhhhhhhhhh... Yes that's it. Got it! Thanks.

    Easy when you know how :D


  • Registered Users, Registered Users 2 Posts: 9,579 ✭✭✭Webmonkey


    No Probs!


  • Advertisement
  • Moderators, Motoring & Transport Moderators, Music Moderators Posts: 12,781 Mod ✭✭✭✭Zascar


    OK one more question if I may.

    My phpbb site is private, it only has one forum and it is for a group of friends for a project we are doing.

    Is it possible to run a query to get everyone subscribed to the one forum so they are notified of new posts?

    Cheers for your help


  • Registered Users, Registered Users 2 Posts: 3,568 ✭✭✭ethernet


    There's a table for this:

    [phpbb_db_prefix]_forums_watch

    Just insert a row for every user for the forum ID of your single forum (assuming they don't mind!).

    This is the same as the user selecting 'subscribe forum' and sets the notify_status field of this table to 0.


Advertisement