// Database Settings define('DB_HOST', '**'); define('DB_PORT', '**'); define('DB_USER', '**'); define('DB_PASS', '**'); define('DB_NAME', '**');
// Connection to Database $database = new MySQLi(DB_HOST, DB_USER, DB_PASS, DB_NAME, DB_PORT);
$sql = 'SELECT AManufactureBrand.brand, AManufactureModel.model, AManufactureEdition.edition' . ' FROM AManufactureModel' . ' INNER JOIN AManufactureBrand ON AManufactureModel.brand_id = AManufactureBrand.brand_id' . ' INNER JOIN AManufactureEdition ON AManufactureModel.model_id = AManufactureEdition.model_id' . ' WHERE AManufactureEdition.edition=\'345i\'';
$resultSet = $database->query($sql);
// Begin building some HTML output
$html = ' Editions ';
while ($row = $resultSet->fetch_assoc()) { $html .= '' . $row['brand'] . ''; $html .= '' . $row['model'] . ''; $html .= '' . $row['edition'] . ''; }
$html .= '';
echo $html; ?>
For example this query calls up BMW 3Series 345i, I have two results from mysql printed to a table on my website. The problem the two records print out on one column going down onwards.
Currently I get a result like this on my webpage two mysql records printing vertical down one column.
http://farm5.static.flickr.com/4089/5037004046_bfa10ffc7b.jpg
I'm trying to make it go across like this and print multiple cars next to each-other horizontally across.
http://farm5.static.flickr.com/4154/5036385491_fac72b5016.jpg