MyBB Community Forums

Full Version: Get value of NewPoints for UID
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
How would I get the value of the NewPoints for a specified UID?

Basically,
I need to get the value of a field, in a row, in a table, in a database.

Thanks.

I have no idea how to work MySQL. :/
SELECT from_columns FROM table WHERE conditions;

You'll have to look in phpMyAdmin to see what the tables are actually called.
Can you tell me what exactly to put in these?

SELECT from_columns FROM mybb_users WHERE conditions;

The field /column heading that I want to get is called "newpoints"

I'm assuming conditions = uid. what should I put there?

Thanks for your help.
I have this:
$q = mysql_query("SELECT `newpoints` FROM `mybb_users` WHERE `mybb_users`.`uid` =8"); 

It returns:
Resource id #3

What am I doing wrong?




I use this function: (after including it, ofc)
newpoints_addpoints(8, 2, 1, 1, false, true);

Then it returns
Warning: require_once(MYBB_ROOTinc/plugins/newpoints/core/hooks.php) [function.require-once]: failed to open stream: No such file or directory in /home/techprim/public_html/inc/plugins/newpoints.php on line 63

Fatal error: require_once() [function.require]: Failed opening required 'MYBB_ROOTinc/plugins/newpoints/core/hooks.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/techprim/public_html/inc/plugins/newpoints.php on line 63

I put it on index too, so it IS in MYBB. don't know why it isn't taking MYBB_ROOT . "inc/plugins/...." as" inc/plugins/..."