How to print php result from mysql date ?
Posted: Mon Jul 14, 2008 12:21 pm
<?php
$user='kdao';
$pass='khaidao';
$host='localhost';
$db='kdao';
$table='guessbook';
$conn = mysql_connect($host,$user,$pass) or die(mysql_error());
mysql_select_db($db,$conn);
$query_1 = "select concat('There are ',to_days('2008-10-15') - to_days(current_date()),' left to the special holiday .');
$result_1 = mysql_query($query_1);
// ??How to print this result_1?
print $result_1; // did not work?
// what is the missing here?
// Thanks.
print "Hello world";
mysql_close($conn);
?>
$user='kdao';
$pass='khaidao';
$host='localhost';
$db='kdao';
$table='guessbook';
$conn = mysql_connect($host,$user,$pass) or die(mysql_error());
mysql_select_db($db,$conn);
$query_1 = "select concat('There are ',to_days('2008-10-15') - to_days(current_date()),' left to the special holiday .');
$result_1 = mysql_query($query_1);
// ??How to print this result_1?
print $result_1; // did not work?
// what is the missing here?
// Thanks.
print "Hello world";
mysql_close($conn);
?>