-rw Posted December 27, 2009 Report Share Posted December 27, 2009 sveika tauta, tatad es esmu iesacejs ar php. kas īsti jaraksta tur tani forum id kur to var atrast? $forumaID = "2"; // foruma id no kura jâvelk ârâ jaunumi <?php$forums = "foruma ceļš"; // foruma atraðanâs $limits = "3"; // limits $forumaID = "2"; // foruma id no kura jâvelk ârâ jaunumi $host = "hosts"; // parasti localhost $dbname = "DB"; // db name $dbuser = "user"; // db username $dbpass = "pass"; // db user pw $link = mysql_connect($host, $dbuser, $dbpass) or die("Neizdevas piekonekteties ?: " . mysql_error()); mysql_select_db($dbname) or die("neizdevas piekonekteties ?"); mysql_query("text/html; charset=utf8"); // charseti // dabonam datus no DB $kverisdivi = mysql_query("SELECT * FROM ibf_topics WHERE forum_id=".$forumaID." ORDER BY start_date DESC LIMIT ".$limits."") or die(mysql_error()); echo "<h1></h1>"; // izvadam jaunumus while($row = mysql_fetch_array( $kverisdivi )) { $rowis = mysql_fetch_array( mysql_query("SELECT * FROM ibf_posts WHERE topic_id = ".$row['tid']." ORDER by post_date LIMIT ".$limits."")); $datums = $row['start_date']; $piev_datums = date("d/m/Y ",$datums); echo "<c href=\"$forums/index.php?showtopic=".$row['tid']."\">".$row['title']."</c> <strong>".$row['description']."</strong><br />"; echo "<div>".$rowis['post']."</div><br /><hr>"; echo "<div><span style='color:black'>Pievienots:</span> $piev_datums | <span style='color:black'>Autors:</span> <a href=\"$forums/index.php?showuser=".$row['starter_id']."\">".$row['starter_name']."</a> | <span style='color:black'>Komentari:</span> (<a href=\"$forums/index.php?showtopic=".$row['tid']."&view=getlastpost\">".$row['posts']."</a>) | <hr><br>"; echo ""; } ?> kas tur pedīņas isti jaraksta. $forums = "foruma ceļš"; // foruma atraðanâs $limits = "3"; // limits $forumaID = "2"; // foruma id no kura jâvelk ârâ jaunumi $host = "hosts"; // parasti localhost $dbname = "DB"; // db name $dbuser = "user"; // db username $dbpass = "pass"; // db user pw Quote Link to comment Share on other sites More sharing options...
mp3 Posted December 27, 2009 Report Share Posted December 27, 2009 (edited) $forums = "foruma ceļš";// tava foruma atrashanas vieta,piemeram, http://localhost/forums $limits = "3"; // cik daudzus izvilkt ara sakumlapā $forumaID = "2"; // ieej adrese kur tev ir forums un atver tieshi to adresi ,no kuras tu gribi redzet jaunumus ,kad iejiesi tur tev bus adreses loga (kur piemeram tu raksti draugiem.lv tur bus http://adrese/forums/index.php?showforum=2 un šis 2 ir jaieraksta tur $host = "hosts"; // raksti tur localhost $dbuser = "user"; // raksti root $dbpass = "pass"; // db user pw kad instalēji appserver tu ievadīji paroli un to pashu paroli raksti $dbname = "DB"; // mape ,kuru tu izveidoji ,akd instalēji forumu ,ja neatceries tieshi tad ieej c://appserver/mysql/data un tur bus visas tavas datubazes Edited December 27, 2009 by mp3 Quote Link to comment Share on other sites More sharing options...
-rw Posted December 29, 2009 Author Report Share Posted December 29, 2009 $forums = "foruma ceļš";// tava foruma atrashanas vieta,piemeram, http://localhost/forums $limits = "3"; // cik daudzus izvilkt ara sakumlapā $forumaID = "2"; // ieej adrese kur tev ir forums un atver tieshi to adresi ,no kuras tu gribi redzet jaunumus ,kad iejiesi tur tev bus adreses loga (kur piemeram tu raksti draugiem.lv tur bus http://adrese/forums/index.php?showforum=2 un šis 2 ir jaieraksta tur $host = "hosts"; // raksti tur localhost $dbuser = "user"; // raksti root $dbpass = "pass"; // db user pw kad instalēji appserver tu ievadīji paroli un to pashu paroli raksti $dbname = "DB"; // mape ,kuru tu izveidoji ,akd instalēji forumu ,ja neatceries tieshi tad ieej c://appserver/mysql/data un tur bus visas tavas datubazes man ir woano.lv hosts. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.