...

View Full Version : delete all fields that...



sasha85
11-02-2007, 06:10 AM
mysql=select dtimes from table1 where dtimes <" &dateadd("n",-20,now())

is it possiable to delete all the fileds that are less than 20 with sql
or i got to use

Do While Not rstemp.EOF
rstemp("dtimes")=""
rstemp.movenext
loop

?

Spudhead
11-02-2007, 02:45 PM
Huh?

You want to find all the records where dtimes is less than (ie: previous to) the time 20 minutes ago, and set the value of dtimes for those records to be empty?

mySQL = "UPDATE table1 SET dtimes = '' WHERE dtimes < " & dateadd("n",-20,now())

sasha85
11-02-2007, 02:49 PM
i got 2 tables...on the table "times" i only null the records column "dtime" (if it is not null) and save this records column "username"... straight after that i need to select on the second table "useringo" the record with the same username that its time was nulled and to null its column "msginfo"

deperatly need you suggestion to how to do this...i do not want to run on all this tables every time...i want it be most minimal and smart :D

Whatever Jr.
11-02-2007, 03:33 PM
Post DDL. Why should we guess how your databse looks like.

Tom



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum