The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
New Row in VB3 DB
Hello,
I am currently working on a hack in which the user has "points". I have written everything out involving the points on a seperate DB and have it working fine. Now I would like to insert a "point" row in for each of my current users and have it work for future users. Could anyone help me with how I would do this? -Mike P.S. I do have phpmyadmin. |
#2
|
||||
|
||||
[sql]
ALTER TABLE user ADD point INT NOT NULL [/sql] |
#3
|
|||
|
|||
Now I'm just having trouble selecting the points row.
PHP Code:
Thanks! -Mike |
#4
|
||||
|
||||
PHP Code:
|
#5
|
||||
|
||||
Try
PHP Code:
|
#6
|
|||
|
|||
Worked perfectly.
Best Regards, -Mike |
#7
|
|||
|
|||
Im having trouble writing to a specific user. Any idea on how I would write the points to the database by userid?
I've been trying to use LIMIT but have been unsuccessful. Thanks, -Mike |
#8
|
||||
|
||||
[SQL]
UPDATE dev_user SET point=1234 WHERE userid=4321 [/SQL] Of course the numbers must be replaced with the actual values If you just want to increase/decrase the points use SET point=point+value. |
#9
|
|||
|
|||
Thank you!
|
#10
|
|||
|
|||
I'm having trouble getting the users point total to display in the postbit. Could you help me with this?
I was thinking I would add into showthread a way to query the DB using each post's information. $query = 'SELECT dev_user FROM points WHERE username=post[musername]'; Im not very familar with the way VB does queries and am having trouble understanding it. -Mike |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|