[英]TYPO3 LIMIT from flexform field
I insert to flexform field max_item_to_display
and try to get that value in my SELECT query
: 我在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
);
The value of max_item_to_display
is in tt_content
table, but above code didn't work. max_item_to_display
的值在tt_content
表中,但以上代码无效。
Any suggestion? 有什么建议吗?
Don't use single quotes when you want to have the variable-value in '$maxDisplayItem'
如果要在
'$maxDisplayItem'
使用变量值,请不要使用单引号
use $maxDisplayItem
without quotes. 使用不带引号的
$maxDisplayItem
。
http://php.net/manual/en/language.types.string.php http://php.net/manual/en/language.types.string.php
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.