簡體   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