sorting query database di php

<tr>

<th rowspan="2">Alternative</th>

<th colspan="<?php echo count($saw->get kriteria()?>">Kriteria</th>

<th rowspan="2">Hasil</th>

<ſtry

<tr>

<?php

foreach ($saw->getKriteria() as $key) {

echo "<th>$key</th>";

}

tr}

</thead>

ktbody>

<?php

foreach ($saw->getAlternative() as $key) {

echo "<tr id='data'>";

echo "<td>".$key['nama Supplier']."</td>";

$no=;$hasil=0;

foreach ($hitungbobot [$key['id_supplier']] as $data) {

echo "<td>$data</td>";

//menjumlahkan

Shasilt=$data;

}

$50W-simpanHasil($key['id_supplier'), $hasil);

echo "<td>" .Shasil,"</td>";

echo "</tr>”;

}

kalo di sorting ini bagian query nya yg di ubah, apa buat kodingan baru ya?

avatar badrzzz
@badrzzz

3 Kontribusi 0 Poin

Dipost 2 tahun yang lalu

Tanggapan

maksudnya mau sorting yang gimana ya? saya gagal paham

2 Jawaban:

<div><br><figure data-trix-attachment="{&quot;contentType&quot;:&quot;image/jpeg&quot;,&quot;filename&quot;:&quot;20211129_181244_min-compress1.jpg&quot;,&quot;filesize&quot;:356329,&quot;height&quot;:3468,&quot;url&quot;:&quot;https://i.ibb.co/zmj1yGn/20211129-181244-min-compress1.jpg&quot;,&quot;width&quot;:4624}" data-trix-content-type="image/jpeg" data-trix-attributes="{&quot;caption&quot;:&quot;1.&quot;,&quot;presentation&quot;:&quot;gallery&quot;}" class="attachment attachment--preview attachment--jpg"><img src="https://i.ibb.co/zmj1yGn/20211129-181244-min-compress1.jpg" width="4624" height="3468"><figcaption class="attachment__caption attachment__caption--edited">1.</figcaption></figure><br><br>ini biar lebih jelas kodingan nya</div>

avatar badrzzz
@badrzzz

3 Kontribusi 0 Poin

Dipost 2 tahun yang lalu

Tanggapan

coba jelasin gan, masalahnya apa, erronya dimana dan maunya bagaimana.

mau di sort desc hasil nya mas, di buat array dulu atau lngsg tabel hasil nya di sort desc?

<div><figure data-trix-attachment="{&quot;contentType&quot;:&quot;image/jpeg&quot;,&quot;filename&quot;:&quot;IMG_20211129_WA0050_min-compress1.jpg&quot;,&quot;filesize&quot;:318671,&quot;height&quot;:2160,&quot;url&quot;:&quot;https://i.ibb.co/zxWt5Sk/IMG-20211129-WA0050-min-compress1.jpg&quot;,&quot;width&quot;:3840}" data-trix-content-type="image/jpeg" data-trix-attributes="{&quot;caption&quot;:&quot;.&quot;,&quot;presentation&quot;:&quot;gallery&quot;}" class="attachment attachment--preview attachment--jpg"><img src="https://i.ibb.co/zxWt5Sk/IMG-20211129-WA0050-min-compress1.jpg" width="3840" height="2160"><figcaption class="attachment__caption attachment__caption--edited">.</figcaption></figure>ini hasil nya yg mau di sort mas</div>

avatar badrzzz
@badrzzz

3 Kontribusi 0 Poin

Dipost 2 tahun yang lalu

Login untuk ikut Jawaban