You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my SQL query I used :placeholders for some debugging of existing code via the Phpmyadmin interface. The placeholder are replaced different in the phpmyadmin interface than via bindparam() or execute($replacements) functions would happen in my understanding of bind variables.
SELECT A.*FROM plugins A
WHEREA.plugin= :plugin_name
Check the checkbox 'bind parameters'
The field :plugin_name appears, fill in info.
Execute the query
You got the error:
Fout
SQL-query:
SELECT A.*
FROM plugins A
WHERE A.plugin = info LIMIT 0, 25
MySQL meldt:
#1054 - Onbekende kolom 'info' in where clause -> translated: Unknown column 'info' in where clause
Expected behavior
When the query is executed, :plugin_name should be replaced with 'info' and not with info.
If in the inputfield also quotes are typed, these are escaped correctly. So the local implementation in the phpmyadmin-interface of the bind parameters seems not to recognize strings.
Screenshots
none
Server configuration
Operating system: Ubuntu 20.04 Desktop
Web server: Server version: Apache/2.4.41 (Ubuntu), Server built: 2020-08-12T19:46:17
Describe the bug
In my SQL query I used :placeholders for some debugging of existing code via the Phpmyadmin interface. The placeholder are replaced different in the phpmyadmin interface than via
bindparam()orexecute($replacements)functions would happen in my understanding of bind variables.http://localhost/phpmyadmin/doc/html/faq.html#i-see-bind-parameters-checkbox-in-the-sql-page-how-do-i-write-parameterized-sql-queries
first implementation: 8cb8281
https://www.php.net/manual/en/pdostatement.bindparam.php (type of input parameters can be set)
https://www.php.net/manual/en/pdostatement.execute.php (all input parameters are treated as strings)
To Reproduce
Steps to reproduce the behavior:
:plugin_nameappears, fill ininfo.Expected behavior
When the query is executed,
:plugin_nameshould be replaced with'info'and not withinfo.If in the inputfield also quotes are typed, these are escaped correctly. So the local implementation in the phpmyadmin-interface of the bind parameters seems not to recognize strings.
Screenshots
none
Server configuration
Apache/2.4.41 (Ubuntu)
Cliëntversie van database: libmysql - mysqlnd 7.4.5
PHP-uitbreiding: mysqliDocumentatie curlDocumentatie mbstringDocumentatie
PHP-versie: 7.4.5
Client configuration
Additional context
none
The text was updated successfully, but these errors were encountered: