1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
|
$aujourdhui = date('Y-m-d');
mysqli_select_db($connect, $database_connect);
$query_base_versions5 = "
SELECT table2.code_circuit, table2.date, table2.version, table2.date_envoi, table2.etat, table2.relance, table2.nbr_jour, table1.code_circuit, table1.code_client, table1.nom_conseiller, table1.nom_production, table1.date_circuit, table1.duree_circuit, table1.etat_voyage, table1.etat_com
FROM table2
INNER JOIN table1
ON table2.code_circuit = table1.code_circuit
WHERE nom_conseiller ='$prenom' AND ((table1.date_circuit + table1.duree_circuit) > '$aujourdhui' ) AND version = (SELECT MAX(version)
FROM table2 a
WHERE a.code_circuit = table1.code_circuit AND table1.etat_voyage = 'Confirmé')
ORDER BY date_circuit ASC LIMIT $offset5, $total_records_per_page5";
$base_versions5 = mysqli_query($connectchilivoyage, $query_base_versions5) or die(mysqli_error());
// $row_base_versions5 = mysqli_fetch_assoc($base_versions5);
$totalRows_base_versions5 = mysqli_num_rows($base_versions5); |
Partager