I have to add one field from a database to our website. I studied the code from the rest of the site and created the following lines:
<?PHP
$dsn="dsn";
$user="";
$pwd="";
if (!$cc=odbc_connect($dsn, $user, $pwd)){
echo "ODBC-Verbindung scheitert";
exit;
}
/ Performing SQL-Query/
$query = "SELECT Field FROM dbo.table WHERE (Field2 = N'$uname');";
$result = odbc_exec($cc,$query);
print $result;
?>
But the result is: "Resource id #4" and not the data. The connection and the SQL-Query seem to work. Can somone help me???
THX