The SQL statement used by the PHP link DBF file

Source: Internet
Author: User
Tags sql error
PHP ODBC DBF

Ask the great God.

After installing the ODBC driver, the link dbf file is ok.
When using SQL statements, why use only the most basic SQL syntax, such as select: ORDER: such as like or getdate () This kind of can not? Or is that the wrong form of operation? Or just don't save this function.
[Microsoft] [ODBC Visual FoxPro Driver] File ' GETDATE.PRG ' does not exist.

Function argument value, type, or count is invalid.

I used to use MSSQL and MySQL. Is there much change in syntax when reading SQL statements with ODBC functions?
Ask the great God to help you.


Reply to discussion (solution)

Post your SQL statement

You can't always use non-existent functions, do you?

Well, but I'm using the most basic SQL statement, isn't that OK?

Select
Ifahrzeug,
Ttimestamp,
GETDATE ()
From C:\BATMAN\DATEN\HISTWECH.DBF
where iwechselnr>1
and ifahrzeug>0
and naktion>0
and naktion<4
and Ifahrzeug like ' 87% '
ORDER BY Ttimestamp Desc;

Warning:odbc_exec () [function.odbc-exec]: SQL error: [Microsoft][odbc Visual FoxPro driver]file ' GETDATE.PRG ' does not ex ist., SQL state S0002 in SQLExecDirect in C:\AppServ\www\batman\batmanliste.php on line 54

Warning:odbc_exec () [function.odbc-exec]: SQL error: [microsoft][odbc Visual FoxPro driver]function argument value, type , or count is invalid., SQL state 37000 in SQLExecDirect in C:\AppServ\www\batman\batmanliste.php on line 53

Big God, basic SQL statement or function whether it is in the MSSQL,MYSQL,VFP, is not all can be used ah?

GETDATE () is a function of SQL Server, which is of course not available in VFP.

O.. Amount:
I have now installed ODBC driver, in PHP must follow the specifications of VFP write SQL?

Does that sound like a basic grammar?

You are accessing the database of VFP, of course, to meet the requirements of VFP
Like is supported.
Date (), Time (), DateTime () are supported

Wouldn't it be a database language to learn again?

OK, I'll try again, see if the language of VFP can be used. Amount:

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.