Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/296.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 哎)。如果您不需要关于建筑物的全部信息,而只需要匹配的数量,那么您应该在查询中对它们进行计数,并从cms_TABLE_B、cms_TABLE_A A中仅返回该数字,其中A.building=B.buildingwell,如果您已经在数组中拥有了所需的建筑物_Php_Mysql_Sql_Arrays - Fatal编程技术网

Php 哎)。如果您不需要关于建筑物的全部信息,而只需要匹配的数量,那么您应该在查询中对它们进行计数,并从cms_TABLE_B、cms_TABLE_A A中仅返回该数字,其中A.building=B.buildingwell,如果您已经在数组中拥有了所需的建筑物

Php 哎)。如果您不需要关于建筑物的全部信息,而只需要匹配的数量,那么您应该在查询中对它们进行计数,并从cms_TABLE_B、cms_TABLE_A A中仅返回该数字,其中A.building=B.buildingwell,如果您已经在数组中拥有了所需的建筑物,php,mysql,sql,arrays,Php,Mysql,Sql,Arrays,哎)。如果您不需要关于建筑物的全部信息,而只需要匹配的数量,那么您应该在查询中对它们进行计数,并从cms_TABLE_B、cms_TABLE_A A中仅返回该数字,其中A.building=B.buildingwell,如果您已经在数组中拥有了所需的建筑物,您可以使用php中的count函数查看有多少(count($array))。如果您不需要关于建筑物的全部信息,而只需要匹配的数量,那么您应该在查询中对它们进行计数,并从cms_TABLE_B B、cms_TABLE_A A中仅返回该数字SEL


哎)。如果您不需要关于建筑物的全部信息,而只需要匹配的数量,那么您应该在查询中对它们进行计数,并从cms_TABLE_B、cms_TABLE_A A中仅返回该数字,其中A.building=B.buildingwell,如果您已经在数组中拥有了所需的建筑物,您可以使用php中的count函数查看有多少(count($array))。如果您不需要关于建筑物的全部信息,而只需要匹配的数量,那么您应该在查询中对它们进行计数,并从cms_TABLE_B B、cms_TABLE_A A中仅返回该数字SELECT count(*),其中A.building=B.building只是想知道,但是为什么您使用的是一个准备好的语句,它没有准备任何东西?这有什么好处吗?我只是想知道,为什么你要使用一个事先准备好的语句,而不是准备任何东西?这有什么好处吗?我只是想知道,为什么你要使用一个事先准备好的语句,而不是准备任何东西?这有什么好处吗?我只是想知道,为什么你要使用一个事先准备好的语句,而不是准备任何东西?这有什么好处吗?
        <?php 
        $sql = "SELECT b.building, a.building FROM cms_TABLE_B b, cms_TABLE_A a WHERE a.building = b.building";
        $result = $database->query($sql);
        $availabilities[] = $database->fetch_array($result);
        ?>

        <?php foreach ($TABLE_ARecords as $record): ?>

        <div class="table-row">
            <div class="property"><span><?php echo htmlencode($record['address']) ?></span></div>
            <div class="availabilities"><span><?php if(in_array($record['building'], $availabilities)) { echo "success"; } else { echo "fail"; } ?></span></div>
        </div>

        <?php endforeach ?>
$sql = "SELECT a.building, a.address FROM cms_TABLE_A a 
        LEFT JOIN cms_TABLE_B b ON a.building = b.building";
 $query = "SELECT a.building,a.address,a.otherInfo FROM cms_TABLE_B b, cms_TABLE_A a WHERE a.building = b.building";
 $result = $database->prepare($query);
 $result->execute();
 while($row = $result->fetch())
 {
      echo "<tr><td>" . $row['building'] . "</td><td>" . $row['address'] . "</td><td>" . $row['otherInfo'] . "</td></tr>";
     //or whatever table format/div format you want to use.
 }