makaks Posted September 20, 2005 Report Share Posted September 20, 2005 Sveicinati! Vai kads varetu pasviest kadu ideju, ka lai izvada datus no datubazes, kuras struktura ir aptuveni sada? Nu nesanak nekadi.... Nu nekads lielais specs ari neesmu... Tabula, piemeram, ir tris kolonnas: prece skaits menesis zimulis 52 1 mape 40 1 burtnica 64 1 zimulis 34 2 burtnica 74 2 mape 40 2 burtnica 49 3 zimulis 39 3 klade 32 3 mape 13 4 burtnica 64 4 zimulis 86 4 .......................................... Vajadzetu izvadit aptuveni sada tabulas forma:, piemeram, burtnicai tas varetu izskatities sadi: .......................................................attieciegie menesi, skaits menesi preces nosaukums-------kopejais skaits - 1 --- 2---- 3 ----- 4----- burtnica------------------------251----------64---74---49------64---- utt. P.S. Par kopejo skaitu it ka nav problemu, nevaru izvadit pa menesiem.... Cerot uz palidzibu, paldies jau ieprieks Link to comment Share on other sites More sharing options...
Kavacky Posted September 20, 2005 Report Share Posted September 20, 2005 Kā tu dabū kopējo? Skaiti visus kopā? Tad gan saskaiti, gan pa vienam izvadi. Link to comment Share on other sites More sharing options...
bubu Posted September 20, 2005 Report Share Posted September 20, 2005 (edited) http://php.lv/f/index.php?showtopic=2935 grupēšanas piemēri http://php.lv/f/index.php?showtopic=2583 http://php.lv/f/index.php?showtopic=724 http://php.lv/f/index.php?showtopic=2156 http://php.lv/f/index.php?showtopic=1306 Edited September 20, 2005 by bubu Link to comment Share on other sites More sharing options...
makaks Posted September 22, 2005 Author Report Share Posted September 22, 2005 Tur jau ta lieta, ka saskaitit visus kopa un izvadit summu es speju, bet problema ir izvadit pa menesiem, attiecigi katra menesa vertibu attiecigaja aile... Link to comment Share on other sites More sharing options...
bubu Posted September 22, 2005 Report Share Posted September 22, 2005 Tev slikti hinti pielec. Precīzāk norādīt? http://dev.mysql.com/doc/mysql/en/select.html#id3032069 Link to comment Share on other sites More sharing options...
Recommended Posts