View Full Version : How to insert values into mysql in vb3.5
Jaynesh
03-11-2006, 10:39 AM
Could someone please tell me how to insert values into a table for php in vBulletin 3.5
i tried
INSERT INTO tablename VALUES ('$myvalue');
Nothing happened, no error message. just nothing.
i also tried
INSERT INTO " . TABLE_PREFIX . "mychat VALUES ('$message');
Nothing happened, no error message, just nothing.
What is the correct way of doing this in vBulletin 3.5
Marco van Herwaarden
03-11-2006, 11:23 AM
Are you using this in a PHP-script or standalone?
If in a script, please post a snippet.
Trigunflame
03-11-2006, 11:28 AM
Could someone please tell me how to insert values into a table for php in vBulletin 3.5
i tried
INSERT INTO tablename VALUES ('$myvalue');
Nothing happened, no error message. just nothing.
i also tried
INSERT INTO " . TABLE_PREFIX . "mychat VALUES ('$message');
Nothing happened, no error message, just nothing.
What is the correct way of doing this in vBulletin 3.5
It depends on the table schema,
ie. if i wanted to insert something into the vbulletin datastore manually from the Vbulletin Query Tool in the Admincp
The schema of this table dictates 2 (columns/fields) which are Title and Data
INSERT INTO datastore VALUES ('test','whatever')
Would insert into the Title field 'test' and 'whatever' into the Data field.
In a php file using Vbulletin I would do something like
$vbulletin->db->query_write("INSERT INTO datastore VALUES ('test','whatever')");
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.