Guest User

Untitled

a guest
May 20th, 2018
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.73 KB | None | 0 0
  1. <?php
  2.     $query = $db -> execute ( "SELECT c.id, c.location, c.ppw, c.berth, c.description, GROUP_CONCAT( g.image SEPARATOR  ' , ' ) as images FROM caravans AS c LEFT JOIN gallery AS g ON g.cid = c.id GROUP BY c.id LIMIT 10" );
  3.  
  4.     while ( $row = $db -> fetchassoc ( $query ) )
  5.     {
  6.         echo '<strong>CARAVAN ID</strong>: ' . $row [ 'id' ] . '<br />';
  7.         echo '<strong>CARAVAN LOC</strong>: ' . $row [ 'location' ] . '<br />';
  8.         echo '<strong>CARAVAN PPW</strong>: ' . $row [ 'ppw' ] . '<br />';
  9.         echo '<strong>CARAVAN BERTH</strong>: ' . $row [ 'berth' ] . '<br />';
  10.         echo '<strong>CARAVAN DESC</strong>: ' . $row [ 'description' ] . '<br />';
  11.         echo '<strong>CARAVAN IMAGES</strong>: ' . $row [ 'images' ];
  12.         echo '<br /><br />';
  13.     }
  14. ?>
Add Comment
Please, Sign In to add comment