Jump to content

Insert tabel row only every 5 minutes with mysql (php)


BrainPill

Recommended Posts

I have quite a challenge for php + mysql query I would like to solve. 

I want to add a row to the database table, but this entry should be done only every 10 minutes;

I want mysql to handle this with date_add(now() interval.

 

 snippet of the code:

$stmt = $conn->prepare("INSERT INTO test.test_tab
		(uid, email, col) VALUES (?, ?, ?, date_add(now(), interval 5 MINUTE)  )
		 ;
		");
		
		$stmt->bind_param("sss", 
		$uid, $email_f , $col );
 
		$stmt->execute();

the browser output gives a call to a member function bind_param error

What is the best way to add a row every 5 minutes while using php ? Can someone help me out?

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...