ok so i got an sql that inserts a row in a database and sets a field time with the value: time() so the field has unix date in it for example the value is: 1262736620 ok what i need to do now is make a script that will delete all rows in that table for wich the insertion date has passed over 15 minutes ..i mean.. to delete all rows wich were inserted 15 or more minutes ago judging by time field kinda like time<15 minutes
WHERE time_field < (time()-(60*15)) time() function is seconds that have passed since 1970-01-01 00:00:00
I hope when you use the time function here you dont expect it to work directly in MySQL. It will with php but TIME for MySQL extracts a time from a date and time string
Lol ofc i don´t... duh it´s a php function.. but then again just break it out of the statement like '".(time()-(60*15))."' and it does work.. I just showed him the basics of it.. if he doesn´t know how to use php syntax wise he should not be asking about this, he should be reading a "basic syntax" manual