Jump to content

Mass Delete #solved


master82

Recommended Posts

I'm trying to write a simple code that will delete the whole row of expired session data I store on my database.

[code]
<?php
include("connect.php");

$now = time();
$sql = "DELETE from active WHERE expire >= $now";
$result = mysql_query($sql,$conn) or die(mysql_error("Unable to delete expired"));

?>
[/code]

I thought that was it until I came to test it - can anyone tweek the code or point me in the right direction?
Link to comment
https://forums.phpfreaks.com/topic/11820-mass-delete-solved/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.