Search code examples
mysqlsqlphpmyadminraspbian

Phpmyadmin return null value for TIMESTAMPDIFF on raspbian


Currently trying to get timeleft value from current time with the time value set by user in settime column but problem is on Raspberry Pi(phpmyadmin) returning NULL value where as on windows version its working perfectly fine.

I export database from windows(phpmyadmin) and import into raspbian(phpmyadmin) still ending up with Null value, not sure what mistake is being made.

SELECT settime, TIMESTAMPDIFF(MINUTE,CURRENT_TIMESTAMP(), settime)AS timeleft FROM feedtime

Windows (phpmyadmin) phpmyadmin on windows

Raspbian (phpmyadmin) phpmyadmin on raspbian

Update: Could the difference of server type be the issue (MySQL and MariaDB)?

windows (phpmyadmin)

windows

raspbian (phpmyadmin)

raspbian


Solution

  • It is working now, indeed the issue was MySQL server type in Rasbian, uninstalled MySQL and installed MariaDB and the no more NULL values. Could someone explain why the incompatibility?

    raspbian timeleft value MySQL to MariaDB