Autor | Zpráva | ||
---|---|---|---|
Fisak Profil |
#1 · Zasláno: 5. 6. 2013, 14:17:50
Dobrý den. Mám výpis tabulky:
function MoveMapImg($x = 0, $y = 0, $rozliseni_vyska = "100%", $rozliseni_sirka = "100%") { $uss_textures_sql = DB::query("SELECT * FROM [ch_users_characters] where [id] = %i", $_SESSION['uss_character_id'], "%lmt", "1")->fetchAll(); foreach ($uss_textures_sql as $n => $row_textures) { $border_top = $row_textures->position_y - 5 + $y; $border_bottom = $row_textures->position_y + 5 + $y; $border_left = $row_textures->position_x - 9 + $x; $border_right = $row_textures->position_x + 9 + $x; echo "<table border=\"0\" width=\"$rozliseni_sirka\" cellpadding=\"0\" cellspacing=\"0\" height=\"$rozliseni_vyska\" class=\"background-table\"><tbody>"; //výpis výškových souřadnic $map_y_sql = DB::query("SELECT DISTINCT [position_y] FROM [ch_map] where [position_z] = %i", $row_textures->position_z, " and [position_y] <= %i", $border_bottom, " and [position_y] >= %i", $border_top, "ORDER BY position_y")->fetchAll(); foreach ($map_y_sql as $n => $row_map_y) { echo "<tr>"; //výpis šířkových souřadnic $map_x_sql = DB::query("SELECT * FROM [ch_map] where [position_y] = %i", $row_map_y->position_y, " and [position_x] <= %i", $border_right, " and [position_x] >= %i", $border_left, "ORDER BY position_x")->fetchAll(); foreach ($map_x_sql as $n => $row_map_x) { echo "<td id=\"background-tb\" cellpadding=\"0\" cellspacing=\"0\" style=\"background-position: 0px ".$row_map_x->img_id."00px;\"></td>"; } echo "</tr>"; } echo "</tbody></table>"; } } MoveMapImg(); $map_x_sql = DB::query("SELECT [position_x], [position_y] FROM [ch_map] WHERE [position_z] = %i". $row_textures->position_z. " and [position_y] <= %i". $border_bottom. " and [position_y] >= %i". $border_top. " and [position_x] <= %i". $border_right. " and [position_x] >= %i". $border_left. " ORDER BY position_y")->fetchAll(); |
||
Jan Tvrdík Profil |
#2 · Zasláno: 5. 6. 2013, 14:32:17
Fisak:
„Bohužel tento dotaz mi nefunguje“ Tak proč nám sem dáváš tunu kódu s dibi a ne ten sestavený SQL dotaz, který ti nefunguje? |
||
Časová prodleva: 11 let
|
0