From 42815bacd6d0f2a660bc3c2ae52b56b52cb44f54 Mon Sep 17 00:00:00 2001 From: Thomas Nilsen Date: Wed, 21 Nov 2018 11:24:39 +0100 Subject: [PATCH] Remove duplicate column name in SQL query --- classes/constellation.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/constellation.php b/classes/constellation.php index 407fdd9..d977cf9 100644 --- a/classes/constellation.php +++ b/classes/constellation.php @@ -123,7 +123,7 @@ class Constellation $operator = ($future)?">=":"<="; $limit++; - $sql = $mysqli->prepare("SELECT users.id, status.type, status.title, status.text, status.time, status.end_time, users.username, status.id, status.id as status_id FROM status INNER JOIN users ON user_id=users.id WHERE `time` $operator ? AND `end_time` $operator ? OR (`time`<=? AND `end_time` $operator ? ) ORDER BY `time` DESC LIMIT ? OFFSET ?"); + $sql = $mysqli->prepare("SELECT users.id, status.type, status.title, status.text, status.time, status.end_time, users.username, status.id as status_id FROM status INNER JOIN users ON user_id=users.id WHERE `time` $operator ? AND `end_time` $operator ? OR (`time`<=? AND `end_time` $operator ? ) ORDER BY `time` DESC LIMIT ? OFFSET ?"); $sql->bind_param("iiiiii",$timestamp, $timestamp, $timestamp, $timestamp, $limit, $offset); $sql->execute(); $query = $sql->get_result();