繁体   English   中英

Flexform字段中的TYPO3 LIMIT

[英]TYPO3 LIMIT from flexform field

我在flexform字段中插入max_item_to_display并尝试在我的SELECT query获取该值:

$maxDisplayItem = $this->_getFlexformConfig('max_item_to_display');

$dbResource = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*',                           // SELECT
                                                     'tx_mageconnect_products',     // FROM
                                                     'product_id IN ('.implode(',',$productIds).') 
                                                        AND store_view = \''.$store.'\'
                                                        AND hidden = \'0\' 
                                                        AND deleted = \'0\'
                                                        AND pid = \''.$pid.'\'',    // WHERE
                                                     'product_id',                  // GROUP BY
                                                     '',                            // ORDER BY
                                                     '$maxDisplayItem'              // LIMIT 
                                                    );

max_item_to_display的值在tt_content表中,但以上代码无效。

有什么建议吗?

如果要在'$maxDisplayItem'使用变量值,请不要使用单引号

使用不带引号的$maxDisplayItem

http://php.net/manual/en/language.types.string.php

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM