getBaseurl不显示mysql的所有行

时间:2018-07-09 13:33:00

标签: mysql

我的网站有问题。 我在网站上添加了158个条目,但仅显示109个。 代码:

    <?php   
    function getBaseUrl() 
{
    $currentPath = $_SERVER['PHP_SELF']; 
    $pathInfo = pathinfo($currentPath); 
    $hostName = $_SERVER['HTTP_HOST']; 
    $protocol = strtolower(substr($_SERVER["SERVER_PROTOCOL"],0,5))=='https://'?'https://':'http://';
    return $protocol.$hostName.$pathInfo['dirname']."/fullinfo.php?id=";
}
$url =  getbaseurl();
$db = MysqliDb::getInstance();
$cars = $db->get('cars');
$db->join("image_url_flickr u", "u.car_id=c.ID", "LEFT");
$db->where("u.status", 'main');
$carz = $db->get ("cars c", null, "c.ID, c.type, c.firm, c.model, c.drive, c.year, c.price, u.image_url");
foreach ($carz as $row){
    $ischeaper = $row['cheaper']; 
    $id = $row['ID'];

    if (!in_array($id, $existingid)){
        $existingid[] = $id;
    ?>
         <tr class="<?php echo $row['type']; ?>" id="<?php echo $id ?>">
             <td class="imagesize"><img  src='<?php echo $row['image_url']; ?>'></td>
             <td class="sortableone"><?php echo $row['firm']; ?></td>
             <td class="sortableone"><?php echo $row['model']; ?></td>
             <td><?php echo $row['drive']; ?></td>
             <td><?php echo $row['year']; ?></td>
             <td><strong><font size="5"><?php echo $row['price']; ?></font></strong></td>
         </tr>

任何想法我该如何解决此问题?

0 个答案:

没有答案