I am also using MySQL 5.7 same problem generates while exporting Mahara portfolios. Error logs are below:
(lib/errors.php:853) Failed to get a recordset: mysqli error: [1064: 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 '?UNION
(lib/errors.php:853) SELECT artefact
(lib/errors.php:853) FROM "view_artefa' at line 1] in EXECUTE("SELECT id FROM "artefact" WHERE "owner" = ?UNION
(lib/errors.php:853) SELECT artefact
(lib/errors.php:853) FROM "view_artefact"
(lib/errors.php:853) WHERE "view" IN (SELECT id FROM "view" WHERE "owner" = ?)
(lib/errors.php:853) ORDER BY id")Command was: SELECT id FROM "artefact" WHERE "owner" = ?UNION
(lib/errors.php:853) SELECT artefact
(lib/errors.php:853) FROM "view_artefact"
(lib/errors.php:853) WHERE "view" IN (SELECT id FROM "view" WHERE "owner" = ?)
(lib/errors.php:853) ORDER BY id and values was (0:1,1:1)
Call stack (most recent first):
* log_message(string(size 790), integer, true, true) at /home/xxxxxx/public_html/lib/errors.php:89
* log_warn(string(size 790)) at /home/xxxxxx/public_html/lib/errors.php:853
* SQLException->__construct(string(size 790)) at /home/xxxxxx/public_html/lib/dml.php:922
* get_column_sql(string(size 231), array(size 2)) at /home/xxxxxx/public_html/export/lib.php:306
* PluginExport->__construct(object(User), integer, integer, string(size 30), integer, integer, integer) at /home/xxxxxx/public_html/export/html/lib.php:83
* PluginExportHtml->__construct(object(User), integer, integer, string(size 30), integer, integer, integer) at /home/xxxxxx/public_html/export/lib.php:1063
* PluginExportAll->__construct(object(User), integer, integer, string(size 30)) at /home/xxxxxx/public_html/export/download.php:82
(lib/dml.php:922) Failed to get a recordset: mysqli error: [1064: 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 '?UNION
(lib/dml.php:922) SELECT artefact
(lib/dml.php:922) FROM "view_artefa' at line 1] in EXECUTE("SELECT id FROM "artefact" WHERE "owner" = ?UNION
(lib/dml.php:922) SELECT artefact
(lib/dml.php:922) FROM "view_artefact"
(lib/dml.php:922) WHERE "view" IN (SELECT id FROM "view" WHERE "owner" = ?)
(lib/dml.php:922) ORDER BY id")Command was: SELECT id FROM "artefact" WHERE "owner" = ?UNION
(lib/dml.php:922) SELECT artefact
(lib/dml.php:922) FROM "view_artefact"
(lib/dml.php:922) WHERE "view" IN (SELECT id FROM "view" WHERE "owner" = ?)
(lib/dml.php:922) ORDER BY id and values was (0:1,1:1)
Call stack (most recent first):
* get_column_sql(string(size 231), array(size 2)) at /home/xxxxxx/public_html/export/lib.php:306
* PluginExport->__construct(object(User), integer, integer, string(size 30), integer, integer, integer) at /home/xxxxxx/public_html/export/html/lib.php:83
* PluginExportHtml->__construct(object(User), integer, integer, string(size 30), integer, integer, integer) at /home/xxxxxx/public_html/export/lib.php:1063
* PluginExportAll->__construct(object(User), integer, integer, string(size 30)) at /home/xxxxxx/public_html/export/download.php:82
My Mahara version is 22.04.1, also checked in 22.04.2 version but problem remains same.
I am also using MySQL 5.7 same problem generates while exporting Mahara portfolios. Error logs are below:
(lib/errors. php:853) Failed to get a recordset: mysqli error: [1064: 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 '?UNION php:853) SELECT artefact php:853) FROM "view_artefa' at line 1] in EXECUTE("SELECT id FROM "artefact" WHERE "owner" = ?UNION php:853) SELECT artefact php:853) FROM "view_artefact" php:853) WHERE "view" IN (SELECT id FROM "view" WHERE "owner" = ?) php:853) ORDER BY id")Command was: SELECT id FROM "artefact" WHERE "owner" = ?UNION php:853) SELECT artefact php:853) FROM "view_artefact" php:853) WHERE "view" IN (SELECT id FROM "view" WHERE "owner" = ?) php:853) ORDER BY id and values was (0:1,1:1) string( size 790), integer, true, true) at /home/xxxxxx/ public_ html/lib/ errors. php:89 string( size 790)) at /home/xxxxxx/ public_ html/lib/ errors. php:853 >__construct( string( size 790)) at /home/xxxxxx/ public_ html/lib/ dml.php: 922 sql(string( size 231), array(size 2)) at /home/xxxxxx/ public_ html/export/ lib.php: 306 >__construct( object( User), integer, integer, string(size 30), integer, integer, integer) at /home/xxxxxx/ public_ html/export/ html/lib. php:83 l->__construct( object( User), integer, integer, string(size 30), integer, integer, integer) at /home/xxxxxx/ public_ html/export/ lib.php: 1063 ->__construct( object( User), integer, integer, string(size 30)) at /home/xxxxxx/ public_ html/export/ download. php:82
(lib/errors.
(lib/errors.
(lib/errors.
(lib/errors.
(lib/errors.
(lib/errors.
(lib/errors.
(lib/errors.
(lib/errors.
(lib/errors.
Call stack (most recent first):
* log_message(
* log_warn(
* SQLException-
* get_column_
* PluginExport-
* PluginExportHtm
* PluginExportAll
(lib/dml.php:922) Failed to get a recordset: mysqli error: [1064: 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 '?UNION sql(string( size 231), array(size 2)) at /home/xxxxxx/ public_ html/export/ lib.php: 306 >__construct( object( User), integer, integer, string(size 30), integer, integer, integer) at /home/xxxxxx/ public_ html/export/ html/lib. php:83 l->__construct( object( User), integer, integer, string(size 30), integer, integer, integer) at /home/xxxxxx/ public_ html/export/ lib.php: 1063 ->__construct( object( User), integer, integer, string(size 30)) at /home/xxxxxx/ public_ html/export/ download. php:82
(lib/dml.php:922) SELECT artefact
(lib/dml.php:922) FROM "view_artefa' at line 1] in EXECUTE("SELECT id FROM "artefact" WHERE "owner" = ?UNION
(lib/dml.php:922) SELECT artefact
(lib/dml.php:922) FROM "view_artefact"
(lib/dml.php:922) WHERE "view" IN (SELECT id FROM "view" WHERE "owner" = ?)
(lib/dml.php:922) ORDER BY id")Command was: SELECT id FROM "artefact" WHERE "owner" = ?UNION
(lib/dml.php:922) SELECT artefact
(lib/dml.php:922) FROM "view_artefact"
(lib/dml.php:922) WHERE "view" IN (SELECT id FROM "view" WHERE "owner" = ?)
(lib/dml.php:922) ORDER BY id and values was (0:1,1:1)
Call stack (most recent first):
* get_column_
* PluginExport-
* PluginExportHtm
* PluginExportAll
My Mahara version is 22.04.1, also checked in 22.04.2 version but problem remains same.