How to make sorting like this: jQuery plugin for sorting HTML tables ?
The fact is that this method does not work, since my data is not ready (not written), but is output from MySQL
<?php ob_start("ob_gzhandler"); define('INCLUDE_CHECK',true); include($_SERVER['DOCUMENT_ROOT'].'/connect.php'); //$result = mysql_query("SELECT * FROM `applications` ORDER BY `id`") or die(mysql_error()); $result = mysql_query(" SELECT `devices`.*, `selects`.deviceName AS name_device, `divisions`.divisionName AS divisionName FROM `devices` LEFT JOIN `selects` ON `selects`.id = `devices`.name_device LEFT JOIN `divisions` ON `divisions`.id = `devices`.division ORDER BY `devices`.id") or die(mysql_error()); $text = ' <table border="1" style="width:100%;" class="table table-condensed table-bordered table-hover"> <thead> <tr> <!--th style="text-align:center;" width="1%">β</th--> <th style="text-align:center;" width="1%;" vertical-align="middle";>ΠΠ°ΠΈΠΌΠ΅Π½ΠΎΠ²Π°Π½ΠΈΠ΅</th> <th style="text-align:center;" width="8%">Π‘Π΅ΡΠ΅Π²ΠΎΠ΅ ΠΈΠΌΡ</th> <th style="text-align:center;" width="6%">IP</th> <th style="text-align:center;" width="3%">ΠΠ°Π±ΠΈΠ½Π΅Ρ</th> <th style="text-align:center;" width="3%">ΠΡΠ΄Π΅Π»</th> <th style="text-align:center;" width="18%">Π‘ΠΏΠ΅ΡΠΈΡΠΈΠΊΠ°ΡΠΈΡ</th> <th style="text-align:center;" width="5%">ΠΠΎΠ»ΡΠ·ΠΎΠ²Π°ΡΠ΅Π»ΠΈ</th> <th style="text-align:center;" width="9%">Π‘Π΅ΡΠΈΠΉΠ½ΡΠΉ Π½ΠΎΠΌΠ΅Ρ</th> <th style="text-align:center;" width="8%">ΠΠ½Π²Π΅Π½ΡΠ°ΡΠ½ΡΠΉ Π½ΠΎΠΌΠ΅Ρ</th> <th style="text-align:center;" width="1%"><input type="checkbox" id="selall" value="1" class="checkbox"></th> </tr> </thead>'; while($row = mysql_fetch_assoc($result)) { $text .= ' <tbody> <tr> <!--td>'.$row['id'].'</td--> <td>'.$row['name_device'].'</td> <td>'.$row['netname'].'</td> <td>'.$row['ip'].'</td> <td>'.$row['room'].'</td> <td>'.$row['divisionName'].'</td> <td>'.$row['cp'].", ".$row['motherboard'].", ".$row['ram'].", ".$row['hdd'].", ".$row['vga'].", ".$row['dvd'].", ".$row['corpus'].'</td> <td>'.$row['users'].'</td> <td>'.$row['serial_number'].'</td> <td>'.$row['invent_number'].'</td> <td><input type="checkbox" class="checkbox" value="" name="ip[]"></td> </tr> </tbody>'; } $text .= ''; $text = str_replace('1900-01-01','<span style="color:blue">ΠΠ΅ Π²ΡΠ΄Π°Π½</span>',$text); echo $text; //ΠΠ°ΠΊΡΡΠ²Π°Π΅ΠΌ ΡΠΎΠ΅Π΄ΠΈΠ½Π΅Π½ΠΈΠ΅ @mysql_close($result); ?>