suppose in database
check_date
2008-12-19 18:12:48 //change time

$sql=mysql_query("select * from table where check_date=now() ")or die("Error: ".mysql_error());
	
	$row = mysql_num_rows($sql);
	if($row>0)
	echo $row;
	{
		echo"Hello";
               //Execute some query
	}

But there is no change in database......
how to do that?? or how to check time continuously? for condition

Hi..
How are you trying to change the database...??
Seems you just getting out the data from the database..

And secondly...
in the if condition...
this condition is getting finished at echo $row;
Check your code.. echo $row should be before if statement..

In database there is column check_date
has value 2008-12-19 18:12:48 //suppose

$sql=mysql_query("select * from table where check_date=now() ")or die("Error: ".mysql_error());
     $norow = mysql_num_rows($sql);
     $row=mysql_fetch_array($sql);
     $id=$row['id'];
     echo $norow;
   
  if($norow>0)
     {
      echo"Hello";
      //Execute some query
$sql2=mysql_query("select * from table where id='$id'")or die("Error: ".mysql_error());
      }

My main problem is
How to check when 2008-12-19 18:12:48 time and current time match?
How to check continuously time with 2008-12-19 18:12:48 so it matches??
I am not getting executed query answer and why??

If there is problem in my code
please give me sample example to run this condition??

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.