gunmetal Posted October 16, 2010 Report Share Posted October 16, 2010 Man ir kods, kurš paņem niku no foruma un izņem bildi no db table members while($row = mysql_fetch_array($result)){ $username = $row[niks]; $user = "SELECT * FROM members WHERE username = '$username'"; $result = mysql_query($user);{$bilde = $result[avatar]; echo "$bilde"; } } kas šeit ir nepareizi ja kods while($row = mysql_fetch_array($result)) { echo "bla bla bla";} } iznes man vajadzīgo no foruma Bet 1. kods neiznes lietotāja bildi Quote Link to comment Share on other sites More sharing options...
Val Posted October 16, 2010 Report Share Posted October 16, 2010 sāc ar to, ka uzraksti normālu mysql pieprasījumu, lai ciklā nav katram lietotājam jātaisa vēl pa vienam. Quote Link to comment Share on other sites More sharing options...
gunmetal Posted October 16, 2010 Author Report Share Posted October 16, 2010 vairs nevejag :D Izdomāju while($row = mysql_fetch_array($result)) { $niks = $row[niks]; $get = mysql_query("SELECT * FROM `members` WHERE `username` = '$niks'"); $co = mysql_fetch_array($get); { $bilde = $co[avatar]; } echo "$bilde<br />"; } 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.