suport Posted December 12, 2010 Report Share Posted December 12, 2010 seit ir scripts kas ir pagiadam http://paste.php.lv/994fa3ddb9a9a75b98a8d6619ac2c370?lang=php šis funkcijas izvelkt manu draugu pulku , bet es velos lai vinsh izvelk konkreti kada lietotaja profil lapa vinja draugus , chakarejos stundam , bet neko , varbut kads var pateikt kuras vietas tieshi janomaina un kas ! Quote Link to comment Share on other sites More sharing options...
Blitz Posted December 12, 2010 Report Share Posted December 12, 2010 (edited) where my_id=$mans_id my_id padod konkretā lietotāja id, kuram vēlies redzēt draugus. lietotaja id iespejams var dabut šādi: // atverot drauga profilu dabun vina lietotajvardu no GET $username=$_GET['view_user']; //pec lietotajvarda dabun drauga ID $user_q = mysql_query("SELECT * FROM lietotaji WHERE username='".$username."'"); $user = mysql_fetch_array($user_q); ///pec tam jau parastajam atlases kverijam sava ID vieta idod drauga ID $result = mysql_query("SELECT * FROM friends where my_id=$user[user_id] LIMIT $till, $maximum"); //talak viss ka parasti Edited December 12, 2010 by Blitz Quote Link to comment Share on other sites More sharing options...
Gints Plivna Posted December 12, 2010 Report Share Posted December 12, 2010 Nu tikai derētu atcerēties, ka eksistē arī tāda lieta, kā savienojumi, datu atlase nav tā kā iespējama tikai no vienas tabulas vien :) Gints Plivna http://datubazes.wordpress.com 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.