From efc8b11972ac67cce6f7ba36533803f8ec0062f8 Mon Sep 17 00:00:00 2001
From: Jared Hancock <jared@osticket.com>
Date: Sat, 26 Oct 2013 19:49:51 +0000
Subject: [PATCH] Fix incorrect sql statement

in Client::getLastTicketIdByEmail()
---
 include/class.client.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/class.client.php b/include/class.client.php
index 3ee32c8f7..7464b841c 100644
--- a/include/class.client.php
+++ b/include/class.client.php
@@ -132,7 +132,7 @@ class Client {
 
     /* ------------- Static ---------------*/
     function getLastTicketIdByEmail($email) {
-        $sql='SELECT ticket.ticketID '.TICKET_TABLE.' ticket '
+        $sql='SELECT ticket.ticketID FROM '.TICKET_TABLE.' ticket '
             .' LEFT JOIN '.USER_TABLE.' user ON user.id = ticket.user_id'
             .' LEFT JOIN '.USER_EMAIL_TABLE.' email ON user.id = email.user_id'
             .' WHERE email.address = '.db_input($email)
-- 
GitLab