'; echo '

Quotes

'; $q_people = "select * from people order by name asc"; $r_people = mysqli_query($dbc, $q_people); $i = 1; $row_count = $r_people->num_rows; //echo $row_count; //$people_array = mysqli_fetch_array($r_people); echo '
'; while($row = mysqli_fetch_array($r_people)) { if($i <= $row_count/2) { //printPerson($row['person_id']); //echo $row['name']; $q_quotes = "select * from quote where person_id='" . $row['person_id'] . "' and visibility=true"; //echo $q_quotes; $r = mysqli_query($dbc, $q_quotes); if($r->num_rows == 0) { //echo 'nada'; } else { echo '
'; echo '

'; while($row_quote = mysqli_fetch_array($r)) { echo '"' . $row_quote['quote'] . '"
'; } echo '

'; $q_name = "select name from people where person_id='" . $row['person_id'] . "' limit 1"; //echo $q_name; $r_name = mysqli_query($dbc, $q_name); while($row_name = mysqli_fetch_array($r_name)) { echo '

' . $row_name['name'] . '

'; } echo '
'; } } $i++; } echo '
'; echo '
'; $i = 1; $r_people = mysqli_query($dbc, $q_people); while($row = mysqli_fetch_array($r_people)) { if($i <= $row_count && $i > $row_count/2) { //printPerson($row['person_id']); //echo $row['name']; $q_quotes = "select * from quote where person_id='" . $row['person_id'] . "' and visibility=true"; //echo $q_quotes; $r = mysqli_query($dbc, $q_quotes); if($r->num_rows == 0) { //echo 'nada'; } else { echo '
'; echo '

'; while($row_quote = mysqli_fetch_array($r)) { echo '"' . $row_quote['quote'] . '"
'; } echo '

'; $q_name = "select name from people where person_id='" . $row['person_id'] . "' limit 1"; //echo $q_name; $r_name = mysqli_query($dbc, $q_name); while($row_name = mysqli_fetch_array($r_name)) { echo '

' . $row_name['name'] . '

'; } echo '
'; } } $i ++; } echo '
'; echo ''; ?>