Fatal error: Call to a member function prepare() on null

荒凉一梦 提交于 2019-12-02 13:21:50

It looks like your $conn variable is not initilazied. I can't see in the code you've uploaded where you are initializing it..

you must remove the ; in SELECT line:

$sql = "SELECT lengd, height, width FROM filters;

into this:

$sql = "SELECT lengd, height, width FROM filters

And remove the $ sign in select statement if this is a column in table:

$sql = "SELECT lengd, height, width FROM filters

      WHERE lengd BETWEEN :min_lengd AND :max_lengd

        AND height BETWEEN :min_height AND :max_height

            AND width BETWEEN :min_width AND :max_width

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