Some SQL queries

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mOdEtWo
    Senior Member
    • Dec 2003
    • 334
    • 3.7.x

    Some SQL queries

    In a couple of days, I'm going to convert my live forums from phpBB2 to vB3. I have some questions to get answeared tho...

    When the PM's are imported, the PM counter displays 0 PM's, even tho it's lots and lots of PM's in the inbox. Can I run a SQL query to update this counter for all members, so it displays correct information? Running the update_counters option in the ACP doesn't help.

    Also, all the imported PM's show up as unread, even tho they were read before the import. Can I run a SQL query to get all unread PM's for all members show up as read?
    meow
  • mOdEtWo
    Senior Member
    • Dec 2003
    • 334
    • 3.7.x

    #2
    Pleae, I really need to know this. Can a moderator move this thread to a more appropriate category/forum, if I don't get an answear?

    Thanks in advance.
    meow

    Comment

    • Jerry
      Senior Member
      • Dec 2002
      • 9137
      • 1.1.x

      #3
      You can run some SQL to make ALL the PM's marked as read if that is what you want ?

      As for the total not being displayed, looks like an import bug, I'll look into it.
      I wrote ImpEx.

      Blog | Me

      Comment

      • mOdEtWo
        Senior Member
        • Dec 2003
        • 334
        • 3.7.x

        #4
        Originally posted by Jerry
        You can run some SQL to make ALL the PM's marked as read if that is what you want ?
        Yes, how do I do that?

        As for the total not being displayed, looks like an import bug, I'll look into it.
        Ok, thank you.
        meow

        Comment

        • Jerry
          Senior Member
          • Dec 2002
          • 9137
          • 1.1.x

          #5
          Originally posted by mOdEtWo
          Yes, how do I do that?
          UPDATE pm SET messageread = 1;

          I belive should do it.

          The PM totals get updated each time a PM is modified, so they will update as PM's are sent and received.
          Last edited by Jerry; Wed 19 May '04, 7:51am.
          I wrote ImpEx.

          Blog | Me

          Comment

          • mOdEtWo
            Senior Member
            • Dec 2003
            • 334
            • 3.7.x

            #6
            That's right, Jerry.

            And thanks for the SQL query. I'm performing the import now, and I'll tell you how it went when I'm done.

            meow

            Comment

            • mOdEtWo
              Senior Member
              • Dec 2003
              • 334
              • 3.7.x

              #7
              Oops, I got an error here, when running that quesry Jerry:

              An error occurred while attempting to execute your query. The following information was returned.
              error number: 1146
              error desc: Table 'vb3.pm' doesn't exist

              EDIT: This is when running the UPDATE pm SET messageread = 1; quesry from the ACP
              Last edited by mOdEtWo; Wed 19 May '04, 8:18am.
              meow

              Comment

              • Jerry
                Senior Member
                • Dec 2002
                • 9137
                • 1.1.x

                #8
                Do you have a table prefix like "vb3_" ? So it would be :

                UPDATE vb3_pm SET messageread = 1;
                I wrote ImpEx.

                Blog | Me

                Comment

                • mOdEtWo
                  Senior Member
                  • Dec 2003
                  • 334
                  • 3.7.x

                  #9
                  Hey Jerry

                  Just stopping by to say that the import went as smooth as it could go. Everything works fine (except from the search index that I will rebuild ASAP).

                  Thanks for everything!


                  Cheers,
                  ~m2
                  meow

                  Comment

                  • Jerry
                    Senior Member
                    • Dec 2002
                    • 9137
                    • 1.1.x

                    #10
                    Top bannana
                    I wrote ImpEx.

                    Blog | Me

                    Comment

                    widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                    Working...