I am using the following script to get the info from the database:
PHP Code:
<?php
mysql_select_db($database_localhost, $localhost);
$query_GetBandMembers = "SELECT name, dob, home, dayjob, instrument, likes, dislikes, photoname FROM profiles ORDER BY id ASC";
$GetBandMembers = mysql_query($query_GetBandMembers, $localhost) or die(mysql_error());
$row_GetBandMembers = mysql_fetch_assoc($GetBandMembers);
$totalRows_GetBandMembers = mysql_num_rows($GetBandMembers);
?>
And it it extracting it fine and showing the right date when I use:
PHP Code:
<?php echo $row_GetBandMembers['dob']; ?>
I want the date to show as 1st January 2001 so I changed the script to:
PHP Code:
<?php
mysql_select_db($database_localhost, $localhost);
$query_GetBandMembers = "SELECT name, DATE_FORMAT('dob','%D %M %Y') AS dob1, home, dayjob, instrument, likes, dislikes, photoname FROM profiles ORDER BY id ASC";
$GetBandMembers = mysql_query($query_GetBandMembers, $localhost) or die(mysql_error());
$row_GetBandMembers = mysql_fetch_assoc($GetBandMembers);
$totalRows_GetBandMembers = mysql_num_rows($GetBandMembers);
?>
The select for the dob (Date of Birth) has changed, and when I use:
PHP Code:
<?php echo $row_GetBandMembers['dob1']; ?>
Now it just shows a blank cell in the table.
I am using Dreamweaver MX, and unfortunately it doesn't have any built in date formatting (a big oversight on their behalf), so it all has to be done by hand 
Ian Gunter
Bookmarks