hello-
 I'm getting a parse error here...any ideas why? This is my first try at databases, 
php, mysql and odbc, so.....
the database is one which i made in MSaccess...
thanks-

<html>
<head>
<title></title>
</head>
<body bgcolor="#999966" link="#FFFFCC" vlink="#FFFFCC" alink="#FFFFCC" text="#000000">

<?php
$odbc_dsn = "mac_test";
$odbc_userid = "";
$odbc_password = "";

$query = "select * from user";

<-------PARSE ERROR ON NEXT LINE ------------------------------------->
if(!(odbc_db = odbc_connect($odbc_dsn, $odbc_userid, $odbc_password)))
<-------PARSE ERROR ON LINE ABOVE---------------------------------->

die("Couldnt connect to $odbc_dsn");

if(!($odbc_rs = odbc_do($odbc_db, $query))) die("Error executing query $query");

$num_cols = odbc_num_fields($odbc_rs);
if($num_cols < 1) die("Query returned an empty set");

for($a = 1; $a <=$num_cols; $a++) {

echo odbc_field_name($odbc_rs, $a);

?>

</body>
</html>

Reply via email to