Quote:
Originally Posted by Jaynesh
Could someone please tell me how to insert values into a table for php in vBulletin 3.5
i tried
Code:
INSERT INTO tablename VALUES ('$myvalue');
Nothing happened, no error message. just nothing.
i also tried
Code:
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')");