1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
<?php
$tsql= 'SELECT ROW_NUMBER() OVER(ORDER BY id_label ASC) AS rowws, id_label, id_glacier, g_name, g_country, l_name, id_replica, t_name, r_name, isOut, isIn, isAnalized, analized, comment, b_name FROM labels AS la
INNER JOIN glaciers AS gl ON gl.id_glacier = la.glaciers_id_glacier
INNER JOIN locations AS lo ON lo.id_location = la.locations_id_location
INNER JOIN types AS ty ON ty.id_type = la.types_id_type
INNER JOIN replicas AS re ON re.id_replica = la.replicas_id_replica
INNER JOIN boxes AS bo ON bo.id_box = la.boxes_id_box
WHERE id_label BETWEEN '.$firstItemPerPgae.' and '.$lastItemPerPgae.' '.$where.'
ORDER BY id_glacier ASC;';
$getResults= sqlsrv_query($conn, $tsql, array(), array("Scrollable"=>"buffered"));
$num_rows = sqlsrv_num_rows( $getResults );
while ($row = sqlsrv_fetch_array($getResults, SQLSRV_FETCH_ASSOC)) {
[... code...]
}
?> |
Partager