Code: Select all
<?php
error_reporting (E_ALL);
$host="localhost"; // Host name
$username="elemental"; // username
$password="rclogin"; // password
$db_name="traffic2"; // Database name
//$rc_profile_table="rc_profile_table"; // Table name
//$rc_profile_relation_table="rc_profile_relation_table"; // Table name
mysql_connect("$host", "$username", "$password")or die("Could not connect to the database: " . mysql_error()) ;
mysql_select_db("$db_name") or die("Could not select database: " . mysql_error()) ;
$sql="SELECT created_at FROM rc_profile_table where created_at > '2011-04-19 08:00:00'";
$result=mysql_query($sql);
$count=mysql_num_rows($result);
$sql="SELECT created_at FROM rc_profile_relation_table where created_at > '2011-04-19 08:00:00'" ;
$result2=mysql_query($sql)or die("Could not execute query: " . $sql . "ERROR: " . mysql_error()) ;
$count2=mysql_num_rows($result)or die(mysql_error()) ;
mysql_close();
?>
how can i put the output in a text file please? to make it look nice?
thank you