Recent Topics

1 Feb 16, 2009 00:00    

MySQL error!

Duplicate entry '17-stw_webshots_s' for key 1(Errno=1062)

Your query:

INSERT INTO evo_pluginevents( pevt_plug_ID, pevt_event, pevt_enabled )

VALUES ( 17, "stw_webshots_s", 1 ), (17, "stw_webshots_l", 1 ), (17, "stw_webshots_xl", 1 )

echo 'obsolete_events';
pre_dump($obsolete_events);

echo 'discovered_events';
pre_dump($discovered_events);

obsolete_events
array(3) {
  [5]=>
  string(14) "stw_webshots_L"
  [6]=>
  string(14) "stw_webshots_S"
  [7]=>
  string(15) "stw_webshots_XL"
}

discovered_events
array(3) {
  [4]=>
  string(14) "stw_webshots_s"
  [5]=>
  string(14) "stw_webshots_l"
  [6]=>
  string(15) "stw_webshots_xl"
}

2 Feb 16, 2009 01:04

I replaced singe quotes with escaped double quotes and everything is good now :)

inc/plugins/model/_plugins_admin.class.php #694

"DELETE FROM T_pluginevents
WHERE pevt_plug_ID = ".$Plugin->ID."
AND pevt_event IN ( \"".implode( '", "', $obsolete_events )."\" )";

3 Feb 23, 2009 21:23

??
I cannot see, how this should be relevant..

Can you still produce it with using single quotes (which are SQL standard btw)?

I rather think that the error only occured once, due to the given circumstances - and needs another fix.

Which b2evo version are you using?

4 Feb 23, 2009 21:28

Ah, I see now from looking closer at it, that the quotes did not match before.
Thanks for fixing it!

5 Feb 24, 2009 01:25

Yeah, I committed a slightly different fix :)


Form is loading...