PDA

View Full Version : quick SQL insert question - vb syntax ??


rob30UK
10-17-2006, 04:43 PM
I need to run the following SQL via a plugin...
INSERT INTO `subscribeforum` ( `subscribeforumid` , `userid` , `forumid` , `emailupdate` )
VALUES ( NULL , $userid, '7', '2'
);


What syntax would I use within the plugin code to perform the above as I understand VB has dataobjects I can tie into?

Thanks for help.

Guest190829
10-17-2006, 10:22 PM
I need to run the following SQL via a plugin...
INSERT INTO `subscribeforum` ( `subscribeforumid` , `userid` , `forumid` , `emailupdate` )
VALUES ( NULL , $userid, '7', '2'
);

What syntax would I use within the plugin code to perform the above as I understand VB has dataobjects I can tie into?

Thanks for help.


$vbulletin->db->query_write("INSERT INTO `subscribeforum`
(`subscribeforumid` , `userid` , `forumid` , `emailupdate` )
VALUES ( NULL , $userid, '7', '2')
");

Paul M
10-17-2006, 10:31 PM
You don't need those awful backwards quote characters though.

Guest190829
10-17-2006, 10:33 PM
You don't need those awful backwards quote characters though.

hehe the backtick - that is usually generated by phpmyadmin....