Hi all,
I have a problem when inserting a register into this table that I'm
working with.
This table belongs to a MySQL database and the storage engine is
MyISAM. The database that I'm using is a legacy database and I can't
change it in any way.
When I insert a register into the table it's MySQL who generates the
primary key for me. Which means that I fill all the required table
fields and leave the primary key field empty for MySQL to fill when I
insert the record. The problem is, since the ".save()" method doesn't
return any value there is no way for me to give any confirmation for
the user if the register was inserted or not. The only way to check if
the new record was inserted is to go to the table and check if the
register is there or not.
Is there any way to go around this? I thought, since this is a MyISAM
table, I could get the last inserted record but I still have no
guaranty that the last record was the one inserted by the user since
there can be two equal lines in the table with the same information
but with a different primary key... How do I know if the last record
was inserted by the user (which means the insert was successful) or if
it was already there before and there was a problem with this last
insert?

Ana


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to