Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9139159
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:21:05+00:00 2026-06-17T09:21:05+00:00

I am writing a plugin for vbulletin, which includes creating a new thread –

  • 0

I am writing a plugin for vbulletin, which includes creating a new thread – the query below is what I have done. The query runs perfectly in phpmyadmin, but is not executed when ran within the php file; no error was reported. Can anyone tell me how to solve this problem? Thank you very much!

mysql_query("INSERT INTO `thread` (`threadid`,  `title`,    `prefixid`, `firstpostid`,  `lastpostid`,   `lastpost`, `forumid`,  `pollid`,   `open`, `replycount`,   `hiddencount`,  `deletedcount`, `postusername`, `postuserid`,   `lastposter`,   `dateline`, `views`,    `iconid`,   `notes`,    `visible`,  `sticky`,   `votenum`,  `votetotal`,    `attach`,   `similar`,  `taglist`,  `awardedcredits`,   `threaddesc`)
                    VALUES        (NULL,        '$mname',    '',         '0',            '0',            '0',        '$M4rumid', '0',         '1',    '0',            '0',            '0',            '$username',     '$userid',       '$username',     '$date',     '0',        '0',        '',         '1',        '0',        '0',        '0',            '0',        '',         NULL,       '0',                'awarded');
             SET    @threadid = LAST_INSERT_ID();

             INSERT INTO `post`   (`postid`,    `threadid`, `parentid`, `username`,     `userid`,   `title`,    `dateline`,     `pagetext`,     `allowsmilie`,  `showsignature`,    `ipaddress`,    `iconid`,   `visible`,  `attach`,   `infraction`,   `reportthreadid`,   `kbank`,    `post_thanks_amount`)
                    VALUES        (NULL,        @threadid,  '0',        '$username',    '$userid',  '$mname',   '$date',        '$postcontent', '1',            '1',                '',             '0',        '1',        '0',        '0',            '0',                '0.00',     '0');
             SET    @postid = LAST_INSERT_ID();

             UPDATE `thread` 
             SET    `firstpostid` = @postid,
                    `lastpostid` = @postid,
                    `lastpost` = '$date'
             WHERE  `threadid` = @threadid;

             UPDATE `user` 
             SET    `posts` = `posts`+1
             WHERE  `userid` = '$userid';");
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T09:21:06+00:00Added an answer on June 17, 2026 at 9:21 am

    Those are 4 queries and not 1.

    From The PHP Manual on mysql_query :

    mysql_query() sends a unique query (multiple queries are not supported) to the currently active database on the server that’s associated with the specified link_identifier.

    And by the way, on the same page:

    This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQL extension should be used.

    And by the way here is how VBulletin wants you to interact with its database: Vbulletin SQL query syntax.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hi i am writing a plugin in which i have displayed various entries from
I'm writing plugin for eclipse which should be XML editor with 2 pages: the
I'm writing a plugin (dll file), and I'm creating a WinForm as its interface/dialog.
I am currently writing a plugin for a game where one feature includes the
I am writing a plugin to an old IE-only WYSIWYG-editor which resides in an
I am writing a plugin for Jira which involves parsing of XML documents. I
where do i start on writing plugin test? I have written some toy plugins
I'm currently writing a plugin and have run into and issue that, from searching
I'm writing a plugin for TinyMCE and have a problem with detecting click events
I am writing the plugin for jQuery. I have the problem with the extension

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.