prepare ("SELECT COUNT(*) FROM sr_projets WHERE actif=1"); $statement->execute(); $statement->bind_result($count); $statement->fetch(); #The result is now in the $count variable. $statement->close(); $act = 1; $stmt = $mysqli->prepare("SELECT p.id, c.client, p.titre, p.description, p.lien FROM sr_projets AS p LEFT JOIN sr_clients AS c ON p.id_client = c.id WHERE p.actif = ? ORDER BY p.ordre ASC, p.id DESC LIMIT ?, ?"); // Bind a variable to the parameter as a string. $stmt->bind_param("iii", $act, $start, $limit); if (!$stmt->execute()) { echo "Execute failed: (" . $stmt->errno . ") " . $stmt->error; } $stmt->store_result(); $stmt->bind_result($id, $client, $projet, $description, $lien); ?>
fetch()){ // logos en premier if($id == 113){ ?> close(); ?>
'; if (($page + $limit) < $count) { echo ''; } echo ""; $mysqli->close(); ?>