Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQL query dies #2

Open
elearningdienst opened this issue May 25, 2020 · 1 comment
Open

SQL query dies #2

elearningdienst opened this issue May 25, 2020 · 1 comment

Comments

@elearningdienst
Copy link

elearningdienst commented May 25, 2020

Additionally that query in results.php dies with MySql 8, don't know why and dont know how to debug:

$result = $db->query('SELECT p.id, p.title, p.speaker, p.link, COUNT(pq.id)
	FROM presentations p
	INNER JOIN presentation_questions pq ON pq.presentationid = p.id
	WHERE secret = "' . $db->escape_string($_GET['secret']) . '"')
	or die(translate('dberr') . '58148.');
@lgommans
Copy link
Owner

Testing with MariaDB 10.3 (MariaDB is a fork of MySQL, created due to "concerns over [MySQL's] acquisition by Oracle") and PHP 7.3, it works in my setup. The secret GET parameter being empty should just yield an empty result set and not crash. I'm not quite sure what the issue might be.

You can debug this by replacing the last line with this:

or die(translate('dberr') . '58148.' . $db->error);

That will add the actual error message from MySQL/MariaDB to the error that is shown in the feedback tool.

I'm curious what the issue is!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants