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:

enter image description here


Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -