arnico Posted September 17, 2004 Report Share Posted September 17, 2004 Tieshi taa :) Datubaazi jau taapeec sauc par datubaazo, nevis failu baazi :) Link to comment Share on other sites More sharing options...
Snukzz Posted September 20, 2004 Author Report Share Posted September 20, 2004 Nu cilvēki -programētāji, grāmatveži - ... da jebkas, nu palīdziet man! Es savādāk tulīt kritīšu iz-mis-sumā! :( Nu vaig man lai tas skripc strādā! paluriet..plz...plz! :huh: Es saslimis un došos čučēt, bet kad atnākšu možkad skriptu ieraudzīšu! ;) Link to comment Share on other sites More sharing options...
bubu Posted September 20, 2004 Report Share Posted September 20, 2004 Neviens tev priekšā tavu kodu nerakstīs, domā pats. Priekšā tev pateikts jau ui cik daudz! Link to comment Share on other sites More sharing options...
Venom Posted September 20, 2004 Report Share Posted September 20, 2004 kā saka: ja nemāki izdarīt pats, māki apmaksāt to, kurš mācēs Link to comment Share on other sites More sharing options...
Snukzz Posted September 20, 2004 Author Report Share Posted September 20, 2004 Baigie... Link to comment Share on other sites More sharing options...
Snukzz Posted September 20, 2004 Author Report Share Posted September 20, 2004 Nu labi... mēģināšu ko saveidot! B) Link to comment Share on other sites More sharing options...
Venom Posted September 20, 2004 Report Share Posted September 20, 2004 kā saka: ja nemāki izdarīt pats, māki apmaksāt to, kurš mācēs un nav ko apvainoties - tāds nu viš i, tas kapitālisms Link to comment Share on other sites More sharing options...
Snukzz Posted September 23, 2004 Author Report Share Posted September 23, 2004 Uzchiniiju!:) bet kaut kas neiet, nesaprotu IF ciklu! Kuraa vietaa man jaaiekodee tas, ka JA kverijs ir tuksh TAD izvadaas tas ja nee raadam kverija rezultaatu <? include($CONF['inc'].'funkcijas.php'); ?> <TABLE cellpadding=0 cellspacing=0> <? $sub_kat_id=user_num($_GET['skatid']); $res=mysql_query('SELECT nos, art, kat_id, sub_kat_id, id, stock FROM preces WHERE stock = 1 && sub_kat_id='.$sub_kat_id); { while($row=mysql_fetch_row($res)){ ?> <TR><TD><A href="./?page=8&prece=<?=$row[4] ?>"><?=$row[1] ?> - <?=$row[0] ?></A></TD></TR> <? if (empty($res)){ echo "Nav prechu";}}} ?> <TR><TD><script LANGUAGE="JavaScript">function goHist(a){ history.go(a);}</script> <FORM METHOD="post"> <INPUT TYPE="button" VALUE=" BACK " onClick="goHist(-1)"> </form> </TD></TR> </TABLE> Link to comment Share on other sites More sharing options...
Venom Posted September 23, 2004 Report Share Posted September 23, 2004 $res=mysql_query('SELECT ...'); if (!$res || !@mysql_affected_rows($res)) { _echo 'Nekā nav'; } else _while($row=mysql_fetch_row($res)) _{ __echo print_r($row,1); _} iemācies pareizi identēt (noformēt ar atstarpēm) kodu, vai vismaz izmanto editoru, kurš iekrāso pāra iekavas, tad arī nesaputrosies ifos/ciklos citādi tev iekš koda lieks { pirms while iraid Link to comment Share on other sites More sharing options...
Snukzz Posted September 23, 2004 Author Report Share Posted September 23, 2004 (edited) hmmm... :huh: pameegjinaashu! Edited September 23, 2004 by Snukzz Link to comment Share on other sites More sharing options...
Snukzz Posted September 23, 2004 Author Report Share Posted September 23, 2004 (edited) Nu... sitaa buus pareizi? <TABLE cellpadding=0 cellspacing=0> <? if (!$res || !@mysql_affected_rows($res)) { echo 'Neka nav'; } else while($row=mysql_fetch_row($res)) { ?> <TR><TD><A href="./?page=8&prece=<?=$row[4] ?>"><?=$row[1] ?> - <?=$row[0] ?></A></TD></TR> <? } ?> <TR><TD><script LANGUAGE="JavaScript">function goHist(a){ history.go(a);}</script> <FORM METHOD="post"> <INPUT TYPE="button" VALUE=" BACK " onClick="goHist(-1)"> </form> </TD></TR> </TABLE> kaut kaa visu laiku izvada ka nekaa nav! Edited September 23, 2004 by Snukzz Link to comment Share on other sites More sharing options...
Venom Posted September 23, 2004 Report Share Posted September 23, 2004 /me vismaz cer, ka pirms tam iekš $res tev izpildījās mysql_query? Link to comment Share on other sites More sharing options...
Snukzz Posted September 23, 2004 Author Report Share Posted September 23, 2004 (edited) Nu ja... :(..... kaut gan ... kverijs bija sitaads $res=mysql_query('SELECT nos, art, kat_id, sub_kat_id, id, stock FROM preces WHERE stock = 1 && sub_kat_id='.$sub_kat_id); Edited September 23, 2004 by Snukzz Link to comment Share on other sites More sharing options...
Snukzz Posted September 28, 2004 Author Report Share Posted September 28, 2004 Klau gjeeniji, palabojiet mani, nemaaku gramatiku! :P <TABLE cellpadding=0 cellspacing=0> <? include($CONF['inc'].'funkcijas.php'); ?><TR> <? $res2=mysql_query('SELECT id, nos FROM brendi); while($row2=mysql_fetch_row($res2)){ ?> <TD><A href="./?page=15&list=<?=$row2[0] ?>"><?=$row2[1] ?></A></TD> <? } ?> </TR> <? $sub_kat_id=user_num($_GET['skatid']); $res=mysql_query('SELECT nos, art, kat_id, sub_kat_id, id, stock FROM preces WHERE stock = 1 && sub_kat_id='.$sub_kat_id); while($row=mysql_fetch_row($res)){ ?> <TR><TD><A href="./?page=8&prece=<?=$row[4] ?>"><?=$row[1] ?> - <?=$row[0] ?></A></TD></TR> <? if (empty($res)){ echo "Nav prechu";}} ?> <TR><TD><a href="#" onClick="history.go(-1)"><-Atpakaļ</a> </TD></TR> </TABLE> Link to comment Share on other sites More sharing options...
Venom Posted September 28, 2004 Report Share Posted September 28, 2004 ieliec pašā sākumā, tur, kur pirmais <? (vai pat vēlams, lai tas būtu <?php) error_reporting(E_ALL); $res2=mysql_query('SELECT id, nos FROM brendi'); iekš mysql && zīmei ir mazliet citādāka nozīme, loģiskiem apvienojumiem pierasts lietot AND while($row=mysql_fetch_row($res)){ ?> <TR><TD><A href="./?page=8&prece=<?=$row[4] ?>"><?=$row[1] ?> - <?=$row[0] ?></A></TD></TR> <? if (empty($res)){ echo "Nav prechu";}} ?> un kas šeit notiek? nu protams, ka izvadīsies, ka nav preču, jo ar fetch_row viss arī būs izzīsts if (empty($res)) echo "Nav prechu"; else while($row=mysql_fetch_row($res)) { ?> <TR><TD><A href="./?page=8&prece=<?=$row[4] ?>"><?=$row[1] ?> - <?=$row[0] ?></A></TD></TR> <? } ?> Link to comment Share on other sites More sharing options...
Recommended Posts