sqlsrv_fetch_array() expects parameter 1 to be resource, boolean given in

对着背影说爱祢 提交于 2019-11-28 14:15:13

Your query failed. This causes sqlsrv_query() to return false.

Your error in your query is an errant comma:

$sql = "SELECT first_col, s_col, t_col,  FROM names ";
                                    ^^^^
                                    HERE

Remove it and your query should work.

FYI, you don't check for errors in your code. You should always check to see if something failed, and if so, get the error message. You would have caught this quickly if you did.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!