Hey I have to make statistics to call from base

I have for example one line of

<p>Mesna zajednica 
<select name="mesto">
<option value="donji_grad">Donji Grad</option>
<option value="karadjordjev_dud">Karadjordjev Dud</option>
<option value="plavinac">Plavinac</option>
<option value="seone">Seone</option>
<option value="ladna_voda">Ladna Voda</option>
<option value="lestar">Lestar</option>
<option value="zlatno_brdo">Zlatno Brdo</option>
<option value="slavija">Slavija</option>
<option value="papazovac">Papazovac</option>
<option value="carina">Carina</option>
<option value="sveti_sava">Sveti Sava</option>
<option value="25maj">25. Maj</option>
<option value="udovice">Udovice</option>
<option value="lipe">Lipe</option>
<option value="mihajlovac">Mihajlovac</option>
<option value="vranovo">Vranovo</option>
<option value="radinac">Radinac</option>
<option value="mala_krsna">Mala Krsna</option>
<option value="skobalj">Skobalj</option>
<option value="osipaonica">Osipaonica</option>
<option value="drugovac">Drugovac</option>
<option value="badljevica">Badljevica</option>
<option value="salinac">Salinac</option>
<option value="kulic">Kulic</option>
<option value="suvodol">Suvodol</option>
<option value="lunjevac">Lunjevac</option>
<option value="landol">Landol</option>
<option value="petrijevo">Petrijevo</option>
<option value="kolari">Kolari</option>
<option value="binovac">Binovac</option>
<option value="lugavcina">Lugavcina</option>
<option value="saraorci">Saraorci</option>
<option value="vucak">Vucak</option>
<option value="vrbovac">Vrbovac</option>
<option value="ralja">Ralja</option>
<option value="dobri_do">Dobri Do</option>
<option value="vodanj">Vodanj</option>
<option value="malo_orasje">Malo Orasje</option>
</select></p>

then when someone filter one later it need to show statistics like

<p>Broj clanova domacinstva <input name="broj_clanova" type="text" id="broj_clanova" size="20"></p>

so I need number in total from one place

and this too

<select name="ime_stranke">
<option value="" selected="selected"></option>
<option value="ds">DS</option>
<option value="sps">SPS</option>
<option value="srs">SRS</option>
<option value="sns">SNS</option>
<option value="pzs">PZS</option>
<option value="kzbs">KZBS</option>
<option value="urs">URS</option>
<option value="ldp">LDP</option>
<option value="ostali">Ostali</option>
</select></p>

and check buttons each check need to be counted as 1, atm I have just name from first check inserted into base, I need when filter from selected place which is first option in questionnaire to show numbers like How much Suzana got votes etc...

I need numbers to be shown in statistic for total from one place

1. Suzana Spasojevic <input name="politicar" type="checkbox" id="politicar" value="suzana_spasojevic"><br>
2. Brance Stojanovic <input name="politicar" type="checkbox" id="politicar" value="brance_stojanovic"><br>
3. Predrag Umicevic <input name="politicar" type="checkbox" id="politicar" value="predrag_umicevic"><br>
4. Jasna Avramovic <input name="politicar" type="checkbox" id="politicar" value="jasna_avramovic"><br>
5. Sasa Radosavljevic <input name="politicar" type="checkbox" id="politicar" value="sasa_radosavljevic"><br>
6. Milan Lukic <input name="politicar" type="checkbox" id="politicar" value="milan_lukic"><br>
7. Dragan Sormaz <input name="politicar" type="checkbox" id="politicar" value="dragan_sormaz"></p>

So what is your question? Do you have any mysql code which does not work as expected? Then show it.

So what is your question? Do you have any mysql code which does not work as expected? Then show it.

no everything works, but I have first option as place, now I need to take statistic from base for each place, and I have names and check boxes and must take for each name to count as 1 in statistics, and numbers

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.