EASOL / easol

EASOL - A New Way to Open Learning with Ed-Tech
http://easol.org
GNU Affero General Public License v3.0
1 stars 4 forks source link

Issue with analytics #360

Open regiscamimura opened 8 years ago

regiscamimura commented 8 years ago

Analytics section is returning a SQL error.

That was caused by a compatibility issue between MSSQL/Azure and the drivers that handle the cursor in PHP side (in this case, PHP is the client using the database server). The types being handled are "sql_variant", and for some reason, the cursor is not able to handle it when the result set is empty.

Tried to use other cursor types, but all of them had its limitations -- they either would not reflect changes in the database, or would not count rows, etc.

So the solution was specific to the failing query, which was to convert the datatype from sql_variant to a simple varchar.