Server Error in '/' Application.

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 'and platform_id=2' at line 1

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: MySql.Data.MySqlClient.MySqlException: 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 'and platform_id=2' at line 1

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[MySqlException (0x80004005): 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 'and platform_id=2' at line 1]
   MySql.Data.MySqlClient.MySqlStream.OpenPacket() +228
   MySql.Data.MySqlClient.NativeDriver.ReadResult(UInt64& affectedRows, Int64& lastInsertId) +62
   MySql.Data.MySqlClient.MySqlDataReader.GetResultSet() +48
   MySql.Data.MySqlClient.MySqlDataReader.NextResult() +461
   MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior) +907
   MySql.Data.MySqlClient.MySqlCommand.ExecuteDbDataReader(CommandBehavior behavior) +4
   System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) +12
   System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +139
   System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior) +160
   System.Data.Common.DbDataAdapter.Fill(DataTable dataTable) +108
   eNRLib.MySQLDataLib.OpenDataTable() +133
   enrpr.Account_E121_Home.load_facebook_data() +217
   enrpr.Account_E121_Home.Page_Load(Object sender, EventArgs e) +81
   System.Web.UI.Control.OnLoad(EventArgs e) +95
   System.Web.UI.Control.LoadRecursive() +59
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +678


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.3535.0