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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
OxnyxWS
Newbie


Joined: 23 Oct 2006
Posts: 8

PostPosted: Fri May 09, 2008 4:24 pm   

Preventing Duplicate Database Entires
 
Hi, I just got my database up and running this morning and would like a hint (I also take solustions) on how to prevent get duplicate entires in my eq database.
I'd like to check and see if anything has the same name in the database and if not add the new record. So I tried the following:
Code:

#IF (!%null(@Item)) 
{
  #IF (!%query(@Item.Name)) {
  #NEW RealmsEq|All @Item }
}

#VAR Item 0
#T- Gather


However it doesn't seem to work. :(
Reply with quote
Dharkael
Enchanter


Joined: 05 Mar 2003
Posts: 593
Location: Canada

PostPosted: Fri May 09, 2008 5:50 pm   
 
Maybe something like:
Code:
#IF (!%ismember(@Item.Name,%dblist(Name))) {
   #NEW RealmsEq|All @Item
}
_________________
-Dharkael-
"No matter how subtle the wizard, a knife between the shoulder blades will seriously cramp his style."
Reply with quote
OxnyxWS
Newbie


Joined: 23 Oct 2006
Posts: 8

PostPosted: Fri May 09, 2008 6:14 pm   
 
Thanks that seems to have done the trick Surprised
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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