Jump to the post that solved this thread.
Solved: 5 Years, 4 Months, 1 Week ago Inserting a Collumn into a Table (DB)
#1
Solved: 5 Years, 4 Months, 1 Week ago
Hello, I have asked many DB questions like this before and I appreciate all the information you have given me!

I was just wondering how I can insert a collumn into the mybb_users table which holds:


rank VARCHAR(120) NOT NULL

I have checked myBB documentation as always and here is my best guess:
$db->add_column("`mybb_users`, VALUES(
	`rank` VARCHAR(120) NOT NULL,
	)");

Thanks In advance for the solution!
<3
Reply
#2
Solved: 5 Years, 4 Months, 1 Week ago
The table prefix is automatically applied so you can just put "users" as the first argument. Argument two is the column name, and the final is the definition. Therefore:

$db->add_column("users", "rank", "VARCHAR(120) NOT NULL");
Reply
Jump to the post that solved this thread.


Forum Jump:


Users browsing this thread: 1 Guest(s)