Real Estate Listings

For Sale $250000

Single Family

3 bd / 2.00 ba / 2400 sqt / 10000 lot

Year built: 2013

1234 W Main St, Prescott, AZ 85412

Details >>

For Sale $250000

Single Family

1 bd / 1.00 ba / 1000 sqt / 0 lot

Year built: 2005

11255 W Turnkey, San Francisco, CA 94115

Details >>

For Sale $2500

Condo

4 bd / 3.00 ba / 4500 sqt / 16201 lot

Year built: 2001

78942 N Pinnacle Peak, Scottsdale, AZ 85255

Details >>

For Sale $525000

Condo

5 bd / 5.00 ba / 1200 sqt / 5000 lot

Year built: 2008

2727 W Second St, Brooklyn, NY 11223

Details >>

Page source code

<?php
use phpCtrl\C_DataGrid;
use 
phpCtrl\C_DataBase;

$_GET['currentPage'] = 'home';

require_once(
"phpGrid/conf.php");  
include_once(
'inc/head.php');    
include_once(
'inc/menu.php');


$db = new C_DataBase(PHPGRID_DB_HOSTNAMEPHPGRID_DB_USERNAMEPHPGRID_DB_PASSWORDPHPGRID_DB_NAME);
$result $db->db_query("select l.*, l.id as listing_id, l.description as listing_description, img.*, lt.type as list_type, pt.type as prop_type from listing l 
                            inner join image img ON img.id = l.main_photo_id
                            inner join listing_type lt ON lt.id = l.listing_type_id 
                            inner join property_type pt ON pt.id = l.property_type_id 
                            inner join listing_status ls ON ls.id =  l.listing_status_id
                            WHERE ls.status = 'Active' "
);
?>

<div class="row">
<?php while($row $db->fetch_array_assoc($result)): ?>

    <div class="column">
        <div class="card">
            <a href="property.php?id=<?= $row['listing_id']; ?>">
                <img src="<?= $row['url'?>" width="80%" class="main-photo">
            </a>
            <h2><?= $row['list_type'?> $<?= $row['asking_price'?></h2>
            <p><?= $row['prop_type'?></p>
            <p><?= $row['bedrooms'?> bd / <?= $row['bath'?> ba / <?= $row['area'?> sqt / <?= $row['lot'?> lot</p>
            <p>Year built: <?= $row['year'?></p>
            <p><?= $row['street1'?><?= $row['city'?><?= $row['state'?> <?= $row['zip'?></p>
            <p><a href="property.php?id=<?= $row['listing_id']; ?>">Details >></a></p>
        </div>
    </div>

<?php  endwhile; ?>
</div>



<?php
include_once('inc/footer.php');
?>