简体   繁体   English

mssql_query():查询失败

[英]mssql_query(): Query failed

I have a script, which makes a query to a remote database, now the problem is that sometimes it returns this error. 我有一个脚本,它对远程数据库进行查询,现在问题是有时它会返回此错误。 Most of the time it is working, but still the error persists in like 5 out of 10 runs of the script. 它大部分时间都在工作,但仍然会出现错误,例如10个运行的脚本中的5个。 Data is always the same, query doesn't change too. 数据总是相同的,查询也不会改变。

mssql_get_last_message();

Doesn't return anything. 不归还任何东西。

Also I tried to increase the memory. 我还试着增加内存。 The most interesting part is that it doesn't return the error every time. 最有趣的部分是它不会每次都返回错误。

The error comes in this part of the code: 错误出现在代码的这一部分:

    if ( ! $this->_result = mssql_query($query))
    {
        throw new Exception($this->get_error_message());
    }

Also set_time_limit(0); ini_set("max_execution_time", 0); 还有set_time_limit(0); ini_set("max_execution_time", 0); set_time_limit(0); ini_set("max_execution_time", 0);

Didn't helped either. 也没有帮助。

This could have been a server issue. 这可能是服务器问题。 At the moment every query works and I get no errors. 目前每个查询都有效,我没有错误。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM