Ernijs_E Posted August 10, 2010 Report Share Posted August 10, 2010 Saglabāju tabulā galvene visu svarīgo informāciju - mājas lapas nosaukums, aprakstu u.tml., bet kā es varu izvilkt tieši nepieciešamo! Respektīvi, man ir tabula, kurā ir lauki - ga_id, ga_name, ga_value, man piemēram vajag izvilkt ga_value kurš atrodas tabulā galvene, kurai ga_name ir nosaukums. Es pat nezinu kā to savādāk izskaidrot! Quote Link to comment Share on other sites More sharing options...
codez Posted August 10, 2010 Report Share Posted August 10, 2010 Varbūt pamēģini šo. Quote Link to comment Share on other sites More sharing options...
Gints Plivna Posted August 10, 2010 Report Share Posted August 10, 2010 http://datubazes.wordpress.com/2007/12/28/sql-select-i/ Quote Link to comment Share on other sites More sharing options...
101111 Posted August 10, 2010 Report Share Posted August 10, 2010 Tabulai "galvene" ir tie lauki ga_name, ga_value ? un katrs ga_name un ga_value pāris atbilst kādam galvenes parametram, piemēram "title" - "mana mājaslapa"? Quote Link to comment Share on other sites More sharing options...
codez Posted August 10, 2010 Report Share Posted August 10, 2010 Camoon, Gint, priekš tik vienkāršu lietu apraksta, tev ir pārāk daudz svešvārdu tajā rakstā. Man liekas, ka tā vietā derētu ilustrēts komikss. Quote Link to comment Share on other sites More sharing options...
Ernijs_E Posted August 10, 2010 Author Report Share Posted August 10, 2010 101111 tieši tā! es jau apmēram 40 minūtes buros pa http://www.tizag.com/mysqlTutorial/mysqlwhere.php, bet nekā! :( Quote Link to comment Share on other sites More sharing options...
Gints Plivna Posted August 10, 2010 Report Share Posted August 10, 2010 (edited) Camoon, Gint, priekš tik vienkāršu lietu apraksta, tev ir pārāk daudz svešvārdu tajā rakstā. Man liekas, ka tā vietā derētu ilustrēts komikss. Vai tad es kādam liedzu tādu izveidot? ;) Edited August 10, 2010 by Gints Plivna Quote Link to comment Share on other sites More sharing options...
Ernijs_E Posted August 10, 2010 Author Report Share Posted August 10, 2010 Būtu labāk kāds palīdzējis! Quote Link to comment Share on other sites More sharing options...
briedis Posted August 10, 2010 Report Share Posted August 10, 2010 Ernij, kas tad nebija saprotams tizag? Man liekas, ka tur viss ir skaidri izstāstīts, pats kādreiz tieši no turienes mācījos... Varbūt labāk tiešām pievērsies kulinārijai, ja programmēšana ir par sarežģītu? :)) Quote Link to comment Share on other sites More sharing options...
codez Posted August 10, 2010 Report Share Posted August 10, 2010 (edited) SELECT ga_value FROM galvene WHERE ga_name='nosaukums'; Edited August 10, 2010 by codez Quote Link to comment Share on other sites More sharing options...
Ernijs_E Posted August 10, 2010 Author Report Share Posted August 10, 2010 (edited) tomēr nē! viņš man neizvada neko! Edited August 10, 2010 by Ernijs_E Quote Link to comment Share on other sites More sharing options...
Ernijs_E Posted August 10, 2010 Author Report Share Posted August 10, 2010 (edited) visu laiku izvada - Resource id #4! <?php $nosaukums = mysql_query("SELECT ga_value FROM galvena WHERE ga_name='web_nosaukums';"); ?> un cenšos izvadīt <?php echo $nosaukums ?> viss ko dabūnu pretī ir Resource id #4! Edited August 10, 2010 by Ernijs_E Quote Link to comment Share on other sites More sharing options...
briedis Posted August 10, 2010 Report Share Posted August 10, 2010 bhah, mysql_fetch_assoc() Quote Link to comment Share on other sites More sharing options...
Ernijs_E Posted August 10, 2010 Author Report Share Posted August 10, 2010 varbūt kāds var uzrakstīt kā man dabūt ārā? Quote Link to comment Share on other sites More sharing options...
briedis Posted August 10, 2010 Report Share Posted August 10, 2010 http://php.net/manual/en/function.mysql-fetch-assoc.php 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.