Passing empty array to run_query() throws an error #20

Closed
opened 2023-11-02 17:01:48 +01:00 by vlw · 0 comments
vlw commented 2023-11-02 17:01:48 +01:00 (Migrated from codeberg.org)
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') LIMIT 1' at line 1

This is caused by run_query() only checking if the value for $param is null, not if it's empty.

"SELECT NULL FROM <table> WHERE () LIMIT 1"
``` You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') LIMIT 1' at line 1 ``` This is caused by `run_query()` only checking if the value for $param is `null`, not if it's empty. ``` "SELECT NULL FROM <table> WHERE () LIMIT 1" ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
vlw/php-mysql#20
No description provided.