oh, true..thanks!
actually its now saying:
isnt odbc_connect() a predefined function?
Fatal error: Call to unsupported or undefined function odbc_connect()
-hmmm...
mac



----- Original Message -----
From: Thiemo Nagel <[EMAIL PROTECTED]>
To: Mac Martine <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, January 24, 2001 9:45 PM
Subject: Re: odbc_connect();


>
> Hi,
>
> as far as I can see that, you forgot the $ sign in front of the odbc_db
> variable at the line, that causes the error.
>
> bye,
>
>   Thiemo
>
>
> Mac Martine schrieb:
> >
> > 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>
>
> --
> ==============================================================
>                    http://www.submitta.com
> Promote your website! Free download of cutting edge high per-
> formance multiple URL submission program. 600+ search engines.
>


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


Reply via email to