Bug #80521 [NEW]: PDO parameter in nested SQLs for derived tables

From: Date: Tue, 15 Dec 2020 20:37:48 +0000
Subject: Bug #80521 [NEW]: PDO parameter in nested SQLs for derived tables
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-231104@lists.php.net to get a copy of this message
From: delmar dot delmar at gmail dot com Operating system: Windows Pro 20H2 PHP version: 8.0.0 Package: PDO Firebird Bug Type: Bug Bug description:PDO parameter in nested SQLs for derived tables Description: ------------ The sample code works in version 7.4.12. After upgrading to PHP 8.0.0 it stopped working. The error message is: object (PDOException) # 3 (8) {["message": protected] => string (118) "SQLSTATE [HY000]: General error: -104 Dynamic SQL Error SQL error code = -104 Token unknown ... PHP does not recognize the parameter COD_ALUNO =: PCOD_ALUNO in nested SQLs for derived tables (select from select). When setting an integer for the COD_ALUNO field everything works. https://firebirdsql.org/refdocs/langrefupd21-select.html#langrefupd21-derived-tables Test script: --------------- https://pastebin.com/1n32Yct4 Expected result: ---------------- As JSON [{"CODIGO":"2118","COD_CURSO":"3","CURSO":"EDUCA\u00c7\u00c3O DE JOVENS E ADULTOS"},{"CODIGO":"977","COD_CURSO":"1","CURSO":"ENSINO FUNDAMENTAL"},{"CODIGO":"2808","COD_CURSO":"1","CURSO":"ENSINO FUNDAMENTAL"},{"CODIGO":"6555","COD_CURSO":"1","CURSO":"ENSINO FUNDAMENTAL"}] -- Edit bug report at https://bugs.php.net/bug.php?id=80521&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=80521&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=80521&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=80521&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=80521&r=needscript Try newer version: https://bugs.php.net/fix.php?id=80521&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=80521&r=support Expected behavior: https://bugs.php.net/fix.php?id=80521&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=80521&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=80521&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=80521&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=80521&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=80521&r=dst IIS Stability: https://bugs.php.net/fix.php?id=80521&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=80521&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=80521&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=80521&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=80521&r=mysqlcfg

« previous php.bugs (#231104) next »