所有到第82行的C:\ AppServ \ www \ PDO \ porto \ porto \ nedmin \ production \ slider.php中的成员函数prepare()on null

时间:2018-04-06 19:44:38

标签: php pdo

我已经编写了这段代码,但它没有用。你能救我吗?

<?php
$Slidersor = $db->prepare("select * from slider order by slider_id DESC limit 25"); // here line 82  
$slidersor->execute();
while ($slidercek = $slidersor->fetch(PDO::FETCH_ASSOC)) { ?>


<tr>

    <td class=" "></td>
    <td class=" "></td>
    <td class=" "></td>
    <td class=" ">
        <button style="width: 90px" class="btn btn-primary">
            <i class="fa fa-pencil" aria-hidden="ture"></i>
            Duzenle
        </button>
    </td>
    <td class=" ">
        <button style="width: 80px" class="btn btn-danger">
            <i class="fa fa-pencil" aria-hidden="ture"></i>
            Sil
        </button>
    </td>
</tr>

错误是

  

致命错误:在第82行的C:\ AppServ \ www \ PDO \ porto \ porto \ nedmin \ production \ slider.php中调用null上的成员函数prepare()

0 个答案:

没有答案