Hello everyone. I have goten this code to work great except for 1 thing so far. Trying to get the dates to output from a DB. All other information will output, but when I add the:
[PHP]
to the output the program errors out:
Catchable fatal error: Object of class DateTime could not be converted to string in C:\Inetpub\wwwroot\msag\index.php on line 78
The error seems pretty straight forward, however, I am not sure how to handle it.
This is my code thusfar, any suggestions or help would be greatly appreciated.
[PHP]
MSAG Database
<?php include 'includes/menu.php'; ?>
Search Category:
Street Name Low Range High Range OEB ESN Number Community Telco Map Number Entry Date Last ModifiedSearch Criteria:
<?phpinclude ‘includes/db/connect.php’;
if(isset($_POST[‘search’]) || isset($_POST[‘submit’]))
{
$category = $_POST[‘category’];
$criteria = $_POST[‘criteria’];
$query = "SELECT * FROM MSAG WHERE $category LIKE '%$criteria%' ORDER BY StreetName ASC";
$resource=sqlsrv_query($conn, $query) or die(print_r(sqlsrv_errors(), true));
}
?>