| 
	
 | 
 Posted by damezumari on 06/21/19 11:28 
Thanks! It worked! 
 
Here is the follow-up problem: 
 
I now have 20051004093359, say, in the lastupdated field which is 
timestamp(14). 
 
However, 
 
<?php 
require 'citc_connect.php'; 
$csql = 'select 
	imagepath, 
	text, 
	lastupdated 
	from citc_weather'; 
$result = mysql_query($csql); 
$nrows = mysql_affected_rows(); 
if ($nrows == -1) {echo 'Unexpected error in the query:<br/>'; 
die($csql);}; 
$row = mysql_fetch_array($result); 
?> 
 
<html> 
<body> 
<p>Last updated: <?php echo $row['lastupdated']; ?> </p> 
<p>Last updated: <?php echo date('l j-M h:i A', $row['lastupdated']); 
?> </p> 
</body> 
</html> 
 
Gives: 
 
Last updated: 20051004093359 
Last updated: Tuesday 19-Jan 11:14 AM 
 
The last line should read: 
 
Last updated: Tuesday 4-Oct 9:33 AM 
 
What am I doing wrong?
 
  
Navigation:
[Reply to this message] 
 |