The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#2
|
||||
|
||||
![]()
let's see....
$users = $DB_site->query("SELECT userid,joindate FROM user"); while($user = $DB_site->fetch_array($users)) { $post = $DB_site->query_first("SELECT * FROM post WHERE userid='$user[userid]' ORDER BY dateline ASC LIMIT 1"); if($post['dateline'] < $user['joindate']) { $DB_site->query("UPDATE user SET joindate='$post[dateline]' WHERE userid='$user[userid]'"); } } first we loop through the user table, then we find the users first post. if the post is older than joindate we update the user table. simple enough. some of the field names might be off, since i wrote it without looking at the database structure but it should work. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|