Page 1 of 1

return value of sql query

Posted: Fri Apr 15, 2011 6:50 am
by wlogeshwaran
This piece of code deletes the row having time less than system time.

1) $tim=time(); $timer=time()+100;
2) mysql_query("delete from test where time < $tim ");
3) mysql_query("update test set time=$timer where status='Waiting');


I want to execute line 3 , only when line 2 actually deletes a row in the table.

Suggest me an idea or tell me what i have to do to check whether line 2 has actually deleted the row. Tell me the return value of the sql query once it get executed.

Re: return value of sql query

Posted: Mon Apr 18, 2011 5:01 pm
by Darhazer