SQL executes correctly in the database, but uses PHP to perform the error:
Warning:mssql_query () [Function.mssql-query]: Query failed in ...
Warning:mssql_fetch_array (): supplied argument is not a valid MS Sql-result resource in ...
The line where the error occurred is as follows:
$query = Mssql_query ($sql); while ($row =mssql_fetch_array ($query)) {
SQL is not posted for a long time, but SQL is absolutely correct, I use echo to output SQL and execute correctly in the database. How can the great God solve the problem above
Reply to discussion (solution)
Warning:mssql_query () [Function.mssql-query]: Query failed in ...
Query failed!
Warning:mssql_query () [Function.mssql-query]: Query failed in ...
Query failed!
But SQL is right and I'm sure it's right. Why does the query fail?
How am I supposed to know it's right?
If SQL is correct, it may be the wrong library.
Besides, what you see is not necessarily the truth, so don't say how it must be.
I have this problem, too.
I have this problem, too.
You try to write SQL in other equivalent form, such as = ' xx ' instead of In (' xx ')