mertkilic0111 adlı üyeden alıntı: mesajı görüntüle
İnceleme şansım var mı? Bu sorgu doğru

SELECT sum(pax),tarih FROM tablo WHERE tarih GROUP BY tarih
$toplam = 0;
                                $ucus = $db->query("SELECT SUM(pax), tarih FROM rezervasyonlar GROUP BY tarih", PDO::FETCH_ASSOC);
                                    if ( $ucus->rowCount() ){
                                     foreach( $ucus as $q){
                                          $pax = $q['pax'];
                                        $tarih = $q['tarih'];
                                         $hash = $q['hash'];
                                        $cocuk = $q['cocuk'];
                                        $free = $q['free'];
                                        $toplam = $toplam+$pax;
buyrun hocam