Closed dmachehin closed 3 years ago
Thanks. I fixed this on e03bc3d.
It will not match if the quotation syntax is inside abc <column> abc
or "abc <column> abc"
.
And it also not match <.>
.
However, it should use placeholder for data in query sentence instead of quoting data by hand.
Hello, this fix broken MariaDB compatibility. I have update composer but still use my repo, because this fix broken my code. This is my query to test the issue:
$db->query("SELECT
This query with last commit didn't work, but work with my last suggestion in the other closed thread without the applied regex.
@BrainStormDevel Change your single quote to double quote for
SELECT CONCAT("[", GROUP_CONCAT(JSON_OBJECT("lid", <table2.lid>) ORDER BY <table2.id>, <table2.lid>),"]")
I will test more for the regex for complex case. But this may fix your case from now.
Hello,
I also have a problem with the RAW function in the current version: https://github.com/catfan/Medoo/issues/912
Can anyone here help me? Looks like a bug.
Medoo::buildRaw
has bad regexp/((FROM|TABLE|INTO|UPDATE)\s*)?\<([a-zA-Z0-9_\.]+)\>/i
For example query
Generate error
Incorrect column name "." in file /vendor/catfan/medoo/src/Medoo.php at line 521
Why do this change? (where is using this table name syntax
<table_name>
?)Suggests fixed:
([a-zA-Z0-9_\.]+)
replace to([a-z][a-zA-Z0-9_\.]*)
) ..... But bug is still exists after fix (partial fixed only)^[a-z\s]*
Replace to:/^[a-z\s]*((FROM|TABLE|INTO|UPDATE)\s*)?\<([a-zA-Z0-9_\.]+)\>/i