> Thank you for your time on this.
No problem.
>
> <?php
> // Function that runs reports on logon history
>
> function logonHist() {
>
> db_connect(); //establish connection
>
> $_qlogonhist = ("SELECT username,host_info,status, DATE_FORMAT(timestamp,
> '%d%m%y')
> as formatted_ts FROM custlogon_hist"); // Build query.
> //$_qlogonhist = ('SELECT * FROM custlogon_hist');
> $_rlogonhist = mysql_query($_qlogonhist) or die(mysql_error());
>
For testing purposes add or die(mysql_error()) to your code as I have above.
That way we can see if the error is in the query.
>
> <?php echo $row['timestamp'];?></font></td>?>
>
> Notice: Undefined index: timestamp in C:\Program Files\Apache
> Group\Apache2\htdocs\Ameriforms\admintool\includes\getlogonhist.ph
> p on line
> 44
timestamp is still undefined, we aliased the column to formatted_ts, so
formatted_ts is the array index. I did this because I'm not certain you can
use a column name that already exist as an alias becuase mySQL likes unique
aliases and I didn't feel like looking up whether or not we could use
'timestamp'
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php