I am having trouble with an MySql query.
string strSql = "select SQL_CALC_FOUND_ROWS *, pv.* from products pv WHERE pv.name = 'Teddy Bear';";
strSql += "SET @resultCount = FOUND_ROWS();"
MySqlParameter parm = new MySqlParameter("@resultCount",MySqlDbType.Int32)
parm.Direction = ParameterDirection.Output;
var result = ObjectContext.ExecuteStoreQuery<Product>(strSql,parm);
return result;
The Error returned is
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 'NULL = FOUND_ROWS()' at line 1
How do I get @resultCount to return the total record count