{HELP}AUTOEP SYSTEM

01/05/2012 18:15 karnyge#1
Ok i have the autoep query by Murtah. Ran it and got a message about duplicate entry for key 1.
Would someone please explain what this means.

Secondly, would someone please explain how i can edit said query to change the rates.

And yes i have used the search function, found several interesting threads about queries. Including the one by SWORD-STALKER.
01/05/2012 18:35 acekill#2
well the duplicate entry means that there is already another entry in ure db with that id used, so instead of INSERT INTO you could change that to REPLACE and re run the query, whenever i edited the auto ep query i just saved it to desktop and opend it with notepad and found where it shows the awarded eps and changed it to what i wanted it to be, should be in the cq_action of the query
01/05/2012 18:39 karnyge#3
Ah. Thanks, that may well help me a lot lol. Will try that now and get back to you in this thread.



delete from cq_monstertype where id >= 3042 and id <= 3042;

So the error is caused because the number 3042 appears in the above line twice?

And i should remove this second id from each line it happens in? And i mean where id is repeated twice in each line?

So it reads
delete from cq_monstertype where id = 3042

??????
yes or no


Additional- for searchers wanting to alter the autoeps.
Easy route around this issue.
Use the navicat sort option to sort ID ascending. Locate the parameter column for the eps awards. They should be in one block of parameters for the autoep system, (ID1-78 for normal monsters and maybe as high as ID186 dependant on DB). Just change the awarded and message of awarded amounts manually. Took me 10-15 minutes.


ISSUE RESOLVED MYSELF!!
Thanks to Ace for his earlier advice. But i did it the way i mentioned in the additional portion of this post.
01/12/2012 19:25 PowerChaos#4
Quote:
Originally Posted by karnyge
delete from cq_monstertype where id >= 3042 and id <= 3042;
Delete from Table where id is equal or greater then number AND id is equal or Smaller then Number

so you try to delete everything that is above that number AND everything that is below that number at the SAME time ??

so if it is number 1 then it is not above 2 , if it is 3 then it is now below 2 so it give big errors

if you like to delete that number only , then just use this
Code:
delete FROM 'cq_monstertype' WHERE 'id' LIKE '3042'
if you want to delete everything above and below
then use this code in 2 Querry's
Code:
delete FROM 'cq_monstertype' WHERE 'id' > '3042'
delete FROM 'cq_monstertype' WHERE 'id' < '3042'
you can not run both codes at the same time , as AND means that it contains x and x at the same time

like
Code:
delete FROM 'cq_monstertype' WHERE 'id' LIKE '3042' AND 'user' LIKE '%PM%'
the above code will delete id 3042 if it match user a username with pm in it on that row

Greetings From PowerChaos
01/12/2012 21:38 karnyge#5
Power
The line was an excerpt from Murtahs, I hope thats spelled right, query which was causing me a problem. I actually solved the issue in the manner i mentioned in my post prior to your reply.
Thx for the info though.