mysql workbench - PHP deleting last 7 day login attempt query error -
i have following mysql query delete last 7 days login attempts;
delete loginattempt loginat < date_sub( now(), interval 7 day )
i error when run in workbench;
error code: 1175. using safe update mode , tried update table without uses key column disable safe mode, toggle option in preferences -> sql editor , reconnect. 0.032 sec
here table;
create table loginattempt( loginid int not null auto_increment, ipaddress varchar(20) not null, loginat datetime not null default now(), primary key(loginid) );
i guess want remove rows older 7 days... anyway disable safe mode must uncheck option in edit > preferences:
Comments
Post a Comment