I have an error with my website. Error:
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'get FROM login WHERE user_id = '252' LIMIT 1' at line 1' in /home/tregolap/public_html/config/class/universal.class.php:110 Stack trace: #0 /home/tregolap/public_html/config/class/universal.class.php(110): PDOStatement->execute(Array) #1 /home/tregolap/public_html/ajaxify/profile/profile_banner.php(89): universal->isOnline('252') #2 /home/tregolap/public_html/profile.php(71): include_once('/home/tregolap/...') #3 {main} thrown in /home/tregolap/public_html/config/class/universal.class.php on line 110
The universal.class.php code is:
if ($user != $session) {
$query = $this->db->prepare("
SELECT MAX(login_id) AS get
FROM login WHERE user_id = :id LIMIT 1");
$query->execute(array(":id" => $user));
Profile banner error:
<?php
if($universal->isOnline($get_id)){
echo "<span class='user_status'>online</span>";
}
Please someone tell me whats wrong or if I have to edit more codes to the topic so I edit it with full info,
Thanks!