Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
rafa80
Newbie


Joined: 30 Nov 2002
Posts: 8

PostPosted: Sat Nov 30, 2002 5:12 am   

Updating a database of chars
 
I have a bot that periodically checks for new chars. When he finds one thats not on the list, he adds their info to a database (name, level, class, club, lastonline(time)) It works very well, doesn't create any duplicate entries or anything. The problem is, chars change all the time, I was trying to make a way to update the info.

When I check for new chars, if they are on the list I want to be able to edit their info so that the list is up to date, but when I try to do this it decides to put random people's info in instead... basically I need to find which record the person is in, then change a few of the keys for that record. Thanks for any help, this is getting to the frustrating stage...
Reply with quote
rafa80
Newbie


Joined: 30 Nov 2002
Posts: 8

PostPosted: Sat Nov 30, 2002 7:05 am   
 
Well, I sorta fixed my problem. I figured out that it was because at the time, I had it ordered by name, it was figuring out the location of the name by what record it was in, then placing the info by what row it was in (record is actual location in db, row is current location so if you have it ordered by name or whatever, record num and row num aren't going to match up.)

Now that I know this, does anyone know of a way so that I can write info by the record num and not row num, or osmething like that so that I don't have to worry about messing it up again on accident? Thanx. by the way here is the alias I use to update the info:

#DBPUT %find( @tempname, all) {Level=@templevel|Class=@tempclass|Club=@tempclub|LastOnline=%time( ddddd):%time( tt)}
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net