Comments - COUNT not working on XAMPP

7 years, 1 month ago John Baraclough

Thanks, leaving out the space works perfectly:

SELECT COUNT(id) FROM repairs;

Is it possible to set IGNORE_SPACE permanently from myphpadmin?

 
7 years, 1 month ago John Baraclough

As suggested in the user manual, I tried this but it didn't have any effect:

SET @@SQL_MODE = CONCAT(@@SQL_MODE, ',IGNORE_SPACE');

MySQL returned an empty result set (i.e. zero rows). (Query took 0.0007 seconds.)
 
7 years, 1 month ago Ian Gilfillan

Doing the above will set the session value of the variable. To apply the change to all sessions, you need to set it globally:

SET @@GLOBAL.SQL_MODE = CONCAT(@@GLOBAL.SQL_MODE, ',IGNORE_SPACE');
 
7 years, 1 month ago John Baraclough

Thanks very much, that's fixed it.

 
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.