Re: Getting ODBC openlink 37000 in odbc_do($conn,"$sql") butodbc_tables($conn) works? Help!
| From: | Jennifer Goodie | Date: | Fri, 03 Oct 2003 04:47:07 +0000 |
| Subject: | Re: Getting ODBC openlink 37000 in odbc_do($conn,"$sql") butodbc_tables($conn) works? Help! | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-30813@lists.php.net to get a copy of this message | ||
> But when I try
>
> $sql="select * form tblJobStatus";
> $results = odbc_do($conn,$sql) or die("<p> captured ".odbc_errormsg());
>
> I get
>
> Warning : odbc_do(): SQL error: [OpenLink][ODBC][Driver]Syntax error or
> access, SQL state 37000 in SQLExecDirect in
> /Library/WebServer/Documents/tests/odbc.php on line 6
That is because you have a syntax error. Try SELECT FROM not SELECT FORM.