-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
This command is not supported in the prepared statement protocol yet #38169
Comments
Have you considered that we have to support also PostgreSQL databases? |
for transaction you can look at
|
this is how i adjusted Mysqlistatement so it checks for this specific error and ignores it while allowing query to proceed, more tests would be needed:
|
I don't think this is the real solution since you won't create a function for every single feature in Mysql (or other databases) and nobody really asked you to do so. My point with this submission is that new J4 handling does not support queries which do not work with prepared statements at all, and thus complex software connot use Joomla's database layer and this will eventualy lead to more code fragmentation and security issues - if the answer is - no we cannot support such queries and everybody should ship it's own database layer to support "create triggerer, start transaction, union, etc... " |
hi @stAn47 i also faced this error in my installer script. here is my code :
and got error this command is not supported in the prepared statement protocol yet. |
Hello, we are using code to create triggerers and/or wrap some code into transactions. Is there any way to run such SQL queries in both Joomla 4 and Joomla 3 compatible way ?
On Joomla 4 i could not identify a public function to execute such a query and even worse, i believe using prepared statements without PDO doesn't really make sense, especially if they break backward compatiblity with 3rd paty code.
To reproduce:
$db = JFactory::getDBO();
$db->setQuery('START TRANSACTION');
$db->execute();
Error given - This command is not supported in the prepared statement protocol yet
(same thing for Create Triggerer or other complex queries)
Possible solutions:
the code above doesn't work now since executeUnpreparedQuery is not public.
best regards, stan
The text was updated successfully, but these errors were encountered: