Hello,
I'm new to using php and am in need of some guidance. Below is the code I'm trying to display. However, all it returns is a blank page. If I replace the SQL with a simple echo text for a good connection test it displays, but I cannot get it to display the query results. Is my SQL incorrect or is my display method incorrect?
<html>
<body>
<?php
$conn=odbc_connect("","","");
if($conn)
{
$sql="SELECT * FROM warehouse";
$results = odbc_execute($conn,$sql);
echo $results
}
else
echo "Database Connect Failed.";
}
odbc_close($conn);
?>
</body>
</html>
I'm new to using php and am in need of some guidance. Below is the code I'm trying to display. However, all it returns is a blank page. If I replace the SQL with a simple echo text for a good connection test it displays, but I cannot get it to display the query results. Is my SQL incorrect or is my display method incorrect?
<html>
<body>
<?php
$conn=odbc_connect("","","");
if($conn)
{
$sql="SELECT * FROM warehouse";
$results = odbc_execute($conn,$sql);
echo $results
}
else
echo "Database Connect Failed.";
}
odbc_close($conn);
?>
</body>
</html>