sandis_m Posted August 30, 2010 Report Share Posted August 30, 2010 Man te tāds sasāpējies jautajums sakarā ar SQL pieprasījumu Šis te man parāda manus draugus (baigi forši) $object->query = "SELECT u.uid,name,lastname,lastactive,profilepic_100,b_year,b_month,b_day,underinfo,privilegie,showage, f.`friendid`,`myid`,`group` FROM `all_classmates` u, `all_classmates_friends` f WHERE f.myid='$_SESSION[user_id]' AND f.friendid=u.uid AND f.`group` != 1 GROUP BY f.friendid ORDER BY f.friendid DESC, f.friendid DESC"; Bet es gribu, lai uz bildes mētātos visādas stulbas dāvanas ( nu tādas kā draugiem.lv ;D ) Ir tabula `gifts` ar lauciņiem gifid(primary) type sendfrom sendto text know paid Un tabula `gifts_files` ar lauciņiem id(primary) title file price Un vajadzētu kaut kā WHERE sendto='usera_id' AND type=gifts_files.file ar tiem JOINiem atkal? Man nesanāk. Googlē meklēju kkādu normālu lasāmvielu par tiem JOINiem, bet neviena sakarīga piemēra neatradu. Nē, nu es jau varētu lietot deadly pieprasījumu iekš pieprasījuma, bēēēt....MySQLiņš sāks nedraudzēties. Quote Link to comment Share on other sites More sharing options...
Aleksejs Posted August 30, 2010 Report Share Posted August 30, 2010 Lūk, latviešu valodā: http://datubazes.wordpress.com/sql-pamati/ Quote Link to comment Share on other sites More sharing options...
sandis_m Posted August 30, 2010 Author Report Share Posted August 30, 2010 Lūk, latviešu valodā: http://datubazes.wordpress.com/sql-pamati/ Oki ;D Paldies, laikam jau toč jāsāk pašam smadzenes kustināt. :)) 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.