简体   繁体   中英

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. 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);

Didn't helped either.

This could have been a server issue. At the moment every query works and I get no errors.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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