1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
| <?php
$del= "DELETE FROM depart WHERE date_depart <= CURDATE()";
$sql="SELECT DATE_FORMAT(date_depart, '%d/%m/%Y') AS date_fr,DATE_FORMAT(heure_depart,'%H:%i') AS time_depart, places_disponibles, province_depart, ville_depart,
point_depart, province_destination, ville_destination, point_destination, prix FROM depart ORDER BY date_depart DESC";
$data = mysql_query($sql) or die('Erreur - table depart: ' . mysql_error());
$totalRows_data = mysql_num_rows($data);
$nb_lignes = 10;
$nb_pages = ceil($totalRows_data/$nb_lignes);
while($info = mysql_fetch_array($data)) {
$tableau_res[] = array('date_fr' =>htmlspecialchars($info['date_fr']),
'time_depart' =>htmlspecialchars($info['time_depart']),
'places_disponibles' => htmlspecialchars($info['places_disponibles']),
'province_depart' => htmlspecialchars($info['province_depart']),
'ville_depart' => htmlspecialchars($info['ville_depart']),
'point_depart' => htmlspecialchars($info['point_depart']),
'province_destination' => htmlspecialchars($info['province_destination']),
'ville_destination' => htmlspecialchars($info['ville_destination']),
'point_destination' => htmlspecialchars($info['point_destination']),
'prix' => htmlspecialchars($info['prix']));
}
?> |
Partager