Page 2 of 2

Posted: Fri Jul 16, 2004 4:44 am
by mjseaden
You can access my database? Here's the code:

Code: Select all

$query = 'SELECT UNIX_TIMESTAMP(''CustomerViewFrom'') CustomerViewFrom FROM Customers';
$result = mysql_query($query);

if(!$result)
{
    do_html_message('Error performing MySQL query - '.mysql_error());
    do_html_footer();
    exit();
}

$row = mysql_fetch_array($result);
echo $row['CustomerViewFrom'];

Posted: Fri Jul 16, 2004 4:54 am
by feyd
ok.. it's because you have single quotes, not backticks..copy this exactly, for that line:

Code: Select all

$query = "SELECT UNIX_TIMESTAMP( `CustomerViewFrom` ) `CustomerViewFrom` FROM `Customers`";

Posted: Fri Jul 16, 2004 4:57 am
by mjseaden
Hi feyd,

Thanks very much - really appreciate the help. I'm now getting the same output as yourself.

Cheers,

Mark