MyBB Requests

How would I do this shit -- mybb & mysql make table and blah blah blah

Submitted by Blowjob, , Thread ID: 3219

Thread Closed

RE: How would I do this shit -- mybb & mysql make table and blah blah blah

#2
You need to a plugin...

function hug_activate ()
{
global $db;
$db->query( 'ALTER TABLE '.TABLE_PREFIX.'users ADD `pomf` AFTER `uid`' );
}

function hug_pull()
{
global $mybb;
echo $mybb->user['pomf'];
}

function hug_push()
{
global $db;
//Assuming you have value of $var1 through solme form's POST/GET request
$db->update_query( 'users', array( 'pomf' => $var1 ), '`uid` = '.$GLOBALS['mybb']->user['uid'] );
}
Do not let your difficulties fill you with anxiety, after all it is only in the darkest nights that stars shine more brightly. - Ali(a.s)

Developer( PHP, Python, C++, HTML+CSS, JS I am available for Hire. Message Me for details.


Users browsing this thread: 1 Guest(s)