Beispiel #1
0
 /**
  * {@inheritDoc}
  */
 public function rowCount()
 {
     return $this->statement->num_rows();
 }
Beispiel #2
0

<?php 
require_once "../resources/templates/menu.php";
?>

<?php 
$id = $_GET['id'];
$stmt = new mysqli_stmt($mysqli, "SELECT first_name, last_name, description, country, dob, file_ext FROM users WHERE id = ?");
$stmt1 = new mysqli_stmt($mysqli, "SELECT COUNT(user_id)FROM adventures WHERE user_id = ?");
if ($stmt1) {
    $stmt1->bind_param("i", $id);
    $stmt1->execute();
    $stmt1->bind_result($adventure_no);
    $stmt1->store_result();
    if ($stmt1->num_rows() == 1) {
        while ($stmt1->fetch()) {
            if ($stmt) {
                $stmt->bind_param("i", $id);
                if ($stmt->execute()) {
                    $stmt->bind_result($first_name, $last_name, $description, $country, $dob, $ext);
                    $stmt->store_result();
                    if ($stmt->num_rows() == 1) {
                        while ($stmt->fetch()) {
                            ?>
<body>
<div class="container">
    <div class="row">

        <div id="Author" class="container">
            <!-- Example row of columns -->
 public function numRecords()
 {
     return $this->statement->num_rows();
 }
Beispiel #4
0
        }
    }
}
?>

    <?php 
$commentArray[] = array();
$sql = "SELECT * FROM comments WHERE adv_id = {$adv_id}";
$res = $mysqli->query($sql) or trigger_error($mysqli->error . "[{$sql}]");
while ($row = $res->fetch_assoc()) {
    $stmt3 = new mysqli_stmt($mysqli, "SELECT first_name, last_name FROM users WHERE id = ?");
    $stmt3->bind_param("i", $row['user_id']);
    $stmt3->execute();
    $stmt3->bind_result($commentFirstName, $commentLastName);
    $stmt3->store_result();
    if ($stmt3->num_rows() == 1) {
        while ($stmt3->fetch()) {
            ?>


                <div class="row">
                    <div
                        class="col-md-6 col-md-offset-1 comments-section">


                        <section>
                            <div class="">
                                <label
                                    class=""><?php 
            echo $commentFirstName;
            echo " ";