Solved MySQL - Changing Copied rows

smoochy boys on tour

ChronicleGM

Dedicated Member
Dedicated Member
Oct 24, 2004
232
1
65
Hi guys,

This bugs me so much i thought id ask if anyone knows how to edit a Copied row in one of the tables for 2.3 files.

Basically ive setup 8 mobs to spawn on 1 mob, copied the data and pasted it in the same table.

But when i want to change any of the data it wont let me and it brings up an error saying i cant change the data as its linked to another piece of data.

Is there any way of changing the data ? I need to reduce the FLD Count as circled below?

Thanks.
Chron.

FldCount.JPG
 

ChronicleGM

Dedicated Member
Dedicated Member
Oct 24, 2004
232
1
65
Sorry, i havent worded it very well.

It seems to be working ok for me having just copied the same Mongen Data for 1 map and pasting it along side. (i wanted 2x the spawns)

I just need to find out how to edit the data after ive pasted it, as it brings up an error message.
 

Attachments

  • Insane.JPG
    Insane.JPG
    140.2 KB · Views: 85
Upvote 0

Tai

HEAD CAPTAIN
Staff member
Administrator
May 11, 2003
14,323
2
2,712
515
United Kingdom
Don't know much about SQL so I usally export/import and use Access to do my editting (big stuff mainly, not changing a single field) just another option for you
 
Upvote 0

Gezza

Golden Oldie
Golden Oldie
Sep 23, 2008
2,201
61
155
uk
Yes but your getting that error from having duplicate rows i can see that in your screen shot therefore it won't let you edit add etc. Your have to remake the mongen and copy/paste your mongen in to the new mongen up to the duplicate row. Only way i know how or i think someone released an sql dup remover in the mir release section somewhere you could try that.
 
Upvote 0

ChronicleGM

Dedicated Member
Dedicated Member
Oct 24, 2004
232
1
65
Gezza, Tai, Thanks for the replies.

I will download the SQL toolkit and give that a go. If that doesnt work ill just have to go with Gezza's suggestion.

Chron.

---------- Post added 08-09-2011 at 04:31 PM ---------- Previous post was 07-09-2011 at 12:14 AM ----------

Sorted it out thanks guys.

Thread can be closed.
 
Upvote 0

Tyraes

Golden Oldie
Golden Oldie
Apr 16, 2007
707
38
135
This is very simple and this is the way I do this, which solves the problem very quickly without errors.

First step would be to locate your duplicate rows. If it's your database you should really know where you've gone wrong as this usually occurs when your copying rows. If not, google 'how to find duplicate records in SQL'.

Second step would be this:
Untitled-2.png


Right click the blank square which is circled in red.

Go to pane >

Click SQL

You'll notice a box appear above the table your currently viewing. In this box it will say something like:

SELECT *
FROM RES_MONSTER

SELECT means select all fields (* this means that, if you want specific fields you type their exact name followed by a comma. E.g. ID, NAME, DC, SC, MC)

FROM means from which table you are wanting to select the fields from.

BE SURE TO COPY ONE OF YOUR DUPLICATED RECORDS BEFORE DELETING. PASTE THIS INTO ANOTHER SQL OR EXCELL.

Delete all the commands in the SQL box so that it is blank. Then type:

DELETE FROM 'YOUR TABLE NAME'
WHERE ID='THE DUPLICATED RECORDS ID'

Please note you HAVE to use the '

For example. If I have a duplicate record in my RES_MONSTER table and the ID was 232 which is a BigRat (only an example)

You would do the following:

DELETE FROM RES_MONSTER
WHERE ID='232'

Execute the command. The button looks like [ ! ]

This will delete any record with the ID 232 in the RES_MONSTER table. This will delete your original and duplicate record. Now copy back in your record and that is how you get rid of these duplicate errors.

Hope this helps.
 
Last edited:
Upvote 0

Tyraes

Golden Oldie
Golden Oldie
Apr 16, 2007
707
38
135
Really? :P

This process only takes 30 seconds to do. It's just a very detailed explanation XD
 
Upvote 0