jauninjais Posted June 12, 2006 Report Share Posted June 12, 2006 vai tieshaam, ja vajag datubaazi, tad to jaaver valjaa pie katra naakamaa case? http://paste.php.lv/3901 apskatat 91 rindu, man no datu baazes jaaiznjem zinja un jaaieliek e-pasta veestulee, bet epasts atnaak vnk kaa Ziņa: tas ir bez $rezultats2[0] Link to comment Share on other sites More sharing options...
v3rb0 Posted June 12, 2006 Report Share Posted June 12, 2006 un kas tad tavuprāt $konekcija glabājas? Link to comment Share on other sites More sharing options...
Vebers Posted June 12, 2006 Report Share Posted June 12, 2006 Nē! Tas tāpēc, ka tev tas $rezultats2 ir "for" ciklā. Saglabā visus rezultātus masīvā vai arī attiecīgo kurš tev nepieciešams. Link to comment Share on other sites More sharing options...
jauninjais Posted June 12, 2006 Author Report Share Posted June 12, 2006 nesapratu kuru tu domaa rezultaatu saglabaat masiivaa? Link to comment Share on other sites More sharing options...
Vebers Posted June 13, 2006 Report Share Posted June 13, 2006 To kuru atgriež no DB. Link to comment Share on other sites More sharing options...
jauninjais Posted June 13, 2006 Author Report Share Posted June 13, 2006 (edited) tu domaa kaut kaa shaadi: <?php $konekcija = mysql_connect('127.0.0.1','123','root') or die ("Datubāzei pieslēgties neizdevās"); mysql_select_db('123',$konekcija); $vaicajums2 = "select * from `info` WHERE `id`= '$vairak'"; $rezultats = mysql_query($vaicajums2,$konekcija); if(mysql_num_rows($rezultats) > 0){ while($rezultats2 = mysql_fetch_array($rezultats)){ $resultsArray[] = $rezultats2['zinja']; echo "<b>[$rezultats2[3]]</b><br />$rezultats2[0]<hr color=\"#7d0415\" size=\"2\">"; echo "<a href=\"java script:window.print()\"><img src=\"images/drukat.png\" border=\"1\" /></a>"; echo "<img src=\"images/tukshs.png\" border=\"0\" /></a>"; echo "<a href=\"vairak.php?raksts=forma\"><img src=\"images/sutit.png\" border=\"1\" /></a>"; } } ------> // taalaak $info .= "Ziņa:\n".$resultsArray[0]."\n"; ?> nee kaut kas neiet taa kaa vajag :/ Edited June 13, 2006 by jauninjais Link to comment Share on other sites More sharing options...
jauninjais Posted June 13, 2006 Author Report Share Posted June 13, 2006 pietam uzraxtot print_r($resultsArray); peec while vinsh man parada zinju, bet, kad raxtu echo $info pie nosuutiishanas, man neko neparaada taas zinjas vietaa Link to comment Share on other sites More sharing options...
jauninjais Posted June 13, 2006 Author Report Share Posted June 13, 2006 nezin cik variantus jau izmeegjinaaju un veel joprojaam neiet, tagad mans kods izskataas shaadi: http://paste.php.lv/3908 varbuut varat pateikt, ko es daru nepareizi? Link to comment Share on other sites More sharing options...
Recommended Posts