Closed AlexejKossmann closed 3 years ago
Context Contao version: 4.9 Bundle version: latest PHP version: 7.4
Description The method Dca::aliasExist allways return false because https://github.com/heimrichhannot/contao-utils-bundle/blob/bd318f728ed05b3ffafdb6742eaeef0359a7cf7a/src/Dca/DcaUtil.php#L661
creates statement: "SELECT id FROM tl_ml_product WHERE ' . $aliasField . '=? AND id!=?"
i consider to change it to: $stmt = $this->connection->prepare("SELECT id FROM {$table} WHERE {$aliasField}=? AND id!=?");
@Defcon0 @koertho what do you think?
Yeah. Or just change ' to " :smile: As you like it ;)
@koertho Yea, but i think its ugly to have different variable insertion in a single statement
Please change it to having only double quotes.
Context Contao version: 4.9 Bundle version: latest PHP version: 7.4
Description The method Dca::aliasExist allways return false because https://github.com/heimrichhannot/contao-utils-bundle/blob/bd318f728ed05b3ffafdb6742eaeef0359a7cf7a/src/Dca/DcaUtil.php#L661
creates statement: "SELECT id FROM tl_ml_product WHERE ' . $aliasField . '=? AND id!=?"
i consider to change it to: $stmt = $this->connection->prepare("SELECT id FROM {$table} WHERE {$aliasField}=? AND id!=?");
@Defcon0 @koertho what do you think?