0

We have made extension using Kickstarter. On DB we have lots of items with the same pid element. We would like to display on list, only first item based on pid. For example:

PID 1

  • record 1
  • record 2
  • record 3

PID 2

  • record 14
  • record 15
  • record 16

PID 3

  • record 21
  • record 22
  • record 23

How to limit displayed items on list to only first elements: record1, record 14, record 21?

To select we use pi_exec_query function.

4

1 回答 1

0

哇,真的很老派,喜欢它;)

无论如何,您应该使用更年轻的 API来查询您的表:

$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
    '*',
    'your_table',
    "pid=$myPid ",
    '',
    'uid ASC',
    '0,3' 
)       
于 2013-10-03T13:48:13.007 回答