Skip to content
This repository has been archived by the owner on May 14, 2023. It is now read-only.

Commit

Permalink
Remove debug echo statement from Interesting
Browse files Browse the repository at this point in the history
  • Loading branch information
varunsingh87 committed Jan 23, 2020
1 parent 99506b2 commit 72eaeb0
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions pages/Interesting.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php

session_start();

Expand All @@ -15,7 +15,7 @@
<div class = "col-sm-10">
<h1>Interesting Questions</h1>

<?php
<?php

define('DISPLAY', 10);

Expand All @@ -26,7 +26,7 @@
$q = "SELECT topic_id FROM `followed-topics` WHERE user_id = {$_SESSION['id']}";
$r = mysqli_query($dbc, $q);
$followedtopics = [];
while ($followrow = mysqli_fetch_array($r, MYSQLI_NUM))
while ($followrow = mysqli_fetch_array($r, MYSQLI_NUM))
$followedtopics[] = $followrow[0];

$following = join("\",\"", $followedtopics);
Expand Down Expand Up @@ -69,7 +69,7 @@
T1.msg_id = T2.parent_id
WHERE T1.topic_id IN ("' . $following . '")
ORDER BY
' . $order_by . ' LIMIT ' . $start . ', ' . DISPLAY;
' . $order_by . ' LIMIT ' . $start . ', ' . DISPLAY;
} else {
$q = 'SELECT
T1.votes AS votes, T1.msg_id AS msg_id, T1.subject AS subject, T1.date_posted AS date_posted, T1.topic_id, T1.name AS topic_name, IFNULL(T2.answers, 0) AS answers
Expand Down Expand Up @@ -109,7 +109,7 @@
WHERE T1.topic_id IN ("' . $following . '") AND T2.answers IS NULL
ORDER BY date_posted LIMIT ' . $start . ', ' . DISPLAY;
}
echo $q;

$result = mysqli_query($dbc, $q);
?>

Expand All @@ -120,7 +120,7 @@
<a class = "<?php echo $sort == 'unanswered' ? 'active': ''; ?>"href = "/Questions/Interesting?sort=unanswered">Unanswered</a>
</div>

<?php
<?php
echo "<table class = 'question-list'>";
while ($row = @mysqli_fetch_array($result, MYSQLI_ASSOC)) { // Loop through the records in an associative array
$timeelapsed = $row['date_posted'] . " days ago";
Expand Down Expand Up @@ -159,4 +159,3 @@

@include_once('includes/footer.html');
?>

0 comments on commit 72eaeb0

Please sign in to comment.