MySQL - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: MySQL (
/showthread.php?tid=275935)
MySQL -
[IL]HeHu - 11.08.2011
What does this error mean:
PHP код:
[21:15:17] [MySQL] Error (0): Failed to exeute query. Duplicate entry 'Acciara_Test' for key 'PRIMARY'.
On this:
PHP код:
format(saveQuery, sizeof(saveQuery),"INSERT INTO `alogs` (`name`,`string`,`to`,`time`,`type`) VALUES ('%s','%s','%s',CURRENT_TIMESTAMP,1)",name,string,name2);
mysql_query(saveQuery);
It's when I tried giving myself money
Re: MySQL -
Onyewu - 11.08.2011
I don't use MySQL myself, but I think it's because your script is trying to add a value in a primary key column which already exists (in that column). You could tick the auto-increment box, or create a new column (i.e. id) which holds the primary key attribute and is auto-incremented.
Re: MySQL -
[IL]HeHu - 11.08.2011
Yeah, I figured it out straight after posting the thread, edited the whole table.
Thanks anyways!