mysql - How to execute 2 more query in php -


i have 2 queries executed simultaneously. should do? :-). here code:

$sql1 = mysql_query("select tregmk.kmk,tmmatakuliah.nmk,ifnull(tmmatakuliah.sks,0) sks tregmk join tmmatakuliah                                  on (tregmk.kmk=tmmatakuliah.kmk) left join v_all_nilai_kk on ((tregmk.kmk=v_all_nilai_kk.kmk) ,                                  (v_all_nilai_kk.stambuk=$_session[stambuk]) , (v_all_nilai_kk.nilai > 2)) (tregmk.tahunajarn=$thajaran)                                  , (tregmk.semester=$smster) , (tregmk.fakultas=$fakpilihan) , (tregmk.prodi=$prodi) , (tregmk.jenjang=$jenjang) ,                                  (v_all_nilai_kk.kmk null) , (tmmatakuliah.nokur=$no_kur)");    $sql2 = mysql_query("select trkrs.nid,trkrs.iplalu,trkrs.sksdicapai,trkrs.sksrencana,trkrs.sksdiambil,                         trkrs.ipk,trkrs.konsentrasi,trkrs.tanggal,tdkrs.kmk,tdkrs.statskmk,tdkrs.tanggal,tmdos.nid,tmdos.nama,                         tmmhs.nasert trkrs join tdkrs on (trkrs.idkrs=tdkrs.idkrs),tmmhs,tmdos                         (tmmhs.stambuk=right(trkrs.idkrs,10)) , (tmdos.nid=trkrs.nid) , (trkrs.idkrs=$idkrs)"); 

why need run them @ same time? doesn't either affect result of other, why can't run them 1 after other use results?

if must run them @ same time, you'll have combine them single query , use results - practically no different running them right after each other anyway.

if there reason based on time, pull time when each query run , use that?


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -