homers Posted October 10, 2009 Report Share Posted October 10, 2009 Tatad gribu izvilkt lietotāja draugus. Kods $rez9 = mysql_fetch_row(mysql_query("SELECT dr_niks FROM draugi WHERE ka=$id ORDER BY id")) or die(); $dr = $rez9[0]; echo $dr; Bet viņš man izvēlk tikai 1cilvēku, kura ID 1 bet ar ID 2,3,4... neizvēlk. Kas par kļūdu? Quote Link to comment Share on other sites More sharing options...
Aleksejs Posted October 10, 2009 Report Share Posted October 10, 2009 Kļūdas tā īsti nemaz nav... Tu vienkārši neesi licis PHP kaut ko vēl izvilkt. Tu esi pateicis "rādi man rindiņu" - tev arī rindiņu parāda. :) Jāliek tam php "kamēr vēl ir kāda rindiņa, tikmēr rādīt rindiņu" $rezultats = mysql_query("SELECT dr_niks FROM draugi WHERE ka=$id ORDER BY id") or die('Viss ir slikti, ' . mysql_error()); while($rez9 = mysql_fetch_row($rezultats)){ $dr = $rez9[0]; echo $dr; } Quote Link to comment Share on other sites More sharing options...
homers Posted October 10, 2009 Author Report Share Posted October 10, 2009 Saprātu :) 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.