更新を与えていない:ありがとうeverbodyは、物事はこのクエリで、今は100%働いている:MYSQL DISTINCT ORDER BYは、正しい順序に
SELECT e.entry_id
FROM exp_channel_titles AS e
INNER JOIN exp_matrix_data AS m ON m.entry_id = e.entry_id
WHERE e.channel_id = 2
GROUP BY e.entry_id
ORDER BY MIN(m.col_id_2) ASC
はここに私のコードです。
ページから.home_laagste_rentes
{exp:channel:entries dynamic="no" fixed_order="0{embed:entry_ids}" disable="member_data|pagination|categories"}
<tr class="{switch="odd|even"}">
<td><a href="#" title="{title}">{title}</a></td>
<td>{dk:lowest col="rente" decimals="2" dec_point=","}%</td>
<td>{count}</td>
</tr>
{/exp:channel:entries}
コードからコード:
<table id="rowspan" cellspacing="0" class="tablesorter">
<thead>
<tr>
<th>Krediet aanbieder</th>
<th>Rente</th>
<th>Beoordeling</th>
</tr>
</thead>
<tbody>
{embed="embeds/.home_laagste_rentes"
entry_ids="{exp:query sql="
SELECT DISTINCT (e.entry_id)
FROM exp_channel_titles AS e
INNER JOIN exp_matrix_data AS m ON m.entry_id = e.entry_id
WHERE e.channel_id = 2
ORDER BY m.col_id_2 ASC
"}|{entry_id}{/exp:query}"}
</tbody>
col_id_2は10進数(10,4)として設定されている
たentry_idが
このintとして設定されているに重複をフィルタリングしていますが、正しい順序を指定していません。フィルタリングの重複がランダムに行われたようです...出力の場合は http://postimage.org/image/9vzahuuez/
リンクされているテーブルを作成するクエリではないこと...穴クエリ – rauschen
こんにちはを投稿してくださいRauschenさん、ちょうど完全なコードで更新されました.. –
@TVoskuilenあなたはテーブル 'exp_channel_titles'と' exp_matrix_data'の 'SCHEMA'を投稿できますか?それは[OK]を働いている、このクエリでは –