“Warning: mysql_query(): supplied argument is not a valid MySQL-Link” - Why?

前端 未结 7 1277
有刺的猬
有刺的猬 2021-01-26 04:17

What\'s wrong with my code? I keep getting this error: Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in functions.php on line 4 error readin

7条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-26 04:59

    $db is not a local variable inside function gameTableCheck, you need to add a global $db; statement at the top of the function.

提交回复
热议问题