解决了:Note that the 'source' command used in the mysql client program is *not* a feature of the server but of the client.
This means that you cannot do
   mysql_query('source myfile.sql');
You will get a syntax error. Use LOAD DATA INFILE as an alternative. 

解决方案 »

  1.   

    刚想要回帖了,居然解决了,楼主两个星了,果然是不耻下问啊,佩服佩服。source应该是mysql客户端工具下的一个命令,php mysql扩展中没有这个用法。source    (\.) Execute an SQL script file. Takes a file name as an argument.
      

  2.   

    哈,能结贴了顺便请教一下,如果我想在PHP中安装一个存储过程,应该如何实现?
      

  3.   

    用PHP拼成一个存储过程,然后调用,其用法跟asp.net等语言不用,感觉php还没有发展到那个地步!
      

  4.   

    不是调用,是要用PHP在MySQL里建立一个存储过程。主要是不会解决DELIMITER的问题