The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
![]()
Hi. After completing a set of calculations in a PHP file (as a CMPS module), I'm trying to commit the results into a few custom profile fields for the current user.
I've read all posts and articles, but still without success. My last code is: Code:
$query = "UPDATE vbulletin_prefix_userfield SET field75 = $intimacy_score, field73 = $intimacy_level, field76 = $intimacy_status WHERE userid = $vbulletin->userinfo['userid']"; --------------- Added [DATE]1214541980[/DATE] at [TIME]1214541980[/TIME] --------------- I was helped by Ideal Web Technologies who reminded me to add the following statement after the query definition: Code:
$vbulletin->db->query($query); Unfortunately, I couldn't make do with vbulletin_prefix_userfield, vbulletin_prefixuserfield, or .table_prefix. Maybe CMPS cannot read these globals. So the final script looks like this: Code:
$query = "UPDATE userfield SET field75 = $intimacy_score, field73 = $intimacy_level, field76 = $intimacy_status WHERE userid = $user_id"; $vbulletin->db->query($query); |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|