请教大神。。安装odbc驱动后,链接DBF文件都OK了。。
使用SQL语句的时候,为什么只能使用最基本的SQL语法,例如SELECT..ORDER..例如like 或者GETDATE()这类的就不行呢?要不就是说运算形式不对。。要不就是不存此函数
[Microsoft][ODBC Visual FoxPro Driver]File 'getdate.prg' does not exist.Function argument value, type, or count is invalid.我以前都是用MSSQL和MYSQL。。是不是在用odbc函数读取SQL语句时,语法有很多改变?
求大神帮下忙。。php odbc dbf

解决方案 »

  1.   

    贴出你的 SQL 语句你总不能使用不存在的函数吧?
      

  2.   

    额,但是我用的是最基本的SQL语句,这样也不行吗?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 exist., SQL state S0002 in SQLExecDirect in C:\AppServ\www\batman\batmanliste.php on line 54Warning: 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大神,基本的SQL语句或者函数无论是在MSSQL,MYSQL,VFP中,是不是都是可以用的啊?
      

  3.   

    GETDATE() 是 sql server 的函数,用在 vfp 中当然是不行的
      

  4.   

    O ..额。。
    那我现在已经安装ODBC驱动,在PHP里面必须按照VFP的规格写SQL吗?那像like这种基本的语法也不行吗?
      

  5.   

    你访问的是 vfp 的数据库,当然要符合 vfp 的要求
    like 是支持的
    date()、time()、datetime() 都是支持的
      

  6.   

    那岂不是还要再学一种数据库语言。好吧,我再来试试,看VFP的语言能不能用。。额。。