php newbie Posted October 6, 2010 Report Share Posted October 6, 2010 1. selektē ziņu no ziņu tabulas. Tad izvadi to. 2. selektē komentārus no komentāru tabulas. Tad izvadi arī tos. Link to comment Share on other sites More sharing options...
Faks Posted October 6, 2010 Author Report Share Posted October 6, 2010 1. selektē ziņu no ziņu tabulas. Tad izvadi to. 2. selektē komentārus no komentāru tabulas. Tad izvadi arī tos. iskatās ka neizproti situaciju kāda viņa ir tad lasi kodu kamēr sapratīsi :) ! Link to comment Share on other sites More sharing options...
php newbie Posted October 6, 2010 Report Share Posted October 6, 2010 *double facepalm* Link to comment Share on other sites More sharing options...
Faks Posted October 7, 2010 Author Report Share Posted October 7, 2010 (edited) *double facepalm* lieta tāda ka nau starpības kā raksta bet kļūda pati pa sevi ir vienalga pacik parbaudiju ... tākā būtu priecīgs dzirdēt kādu prātīgu atbildi savādak neko vairak par bēzjēdzīgiem postiem neredzu Edited October 10, 2010 by Faks Link to comment Share on other sites More sharing options...
php newbie Posted October 7, 2010 Report Share Posted October 7, 2010 iskatās ka neizproti situaciju kāda viņa ir tad lasi kodu kamēr sapratīsi :) ! tu vispār saproti ko tu pats raksti, vai tā uz dullo? http://paste.php.lv/4c30d2286cdd7334d856ce966abc618f?lang=php 14. rindiņa $news_select = ("SELECT `id`,`news_id` AS `c`,(SELECT `news_text` FROM `news` WHERE `id`=`c`) AS `news_teksts`,(SELECT `news_title` FROM `news` WHERE `id`=`c`) AS `news_title`,`comment_name`,`comment_text`,`comment_datetime` FROM comment WHERE `news_id`= '$id'; "); ko šitais nolasa no db? p.s. šitais laikam ir trollis. pie tam labs :) Link to comment Share on other sites More sharing options...
Faks Posted October 7, 2010 Author Report Share Posted October 7, 2010 (edited) tu vispār saproti ko tu pats raksti, vai tā uz dullo? 14. rindiņa $news_select = ("SELECT `id`,`news_id` AS `c`,(SELECT `news_text` FROM `news` WHERE `id`=`c`) AS `news_teksts`,(SELECT `news_title` FROM `news` WHERE `id`=`c`) AS `news_title`,`comment_name`,`comment_text`,`comment_datetime` FROM comment WHERE `news_id`= '$id'; "); ko šitais nolasa no db? p.s. šitais laikam ir trollis. pie tam labs :) iznāk tāka news_id tiek pārvērst par c un tad iznak ka vienu salidzina ar id hmmm iskatas ka tomer kods ir nepareizs un būs jāpāraksta ar leftjoin ... protams būšu priecīgs redzēt ieteikumus :) Edited October 10, 2010 by Faks Link to comment Share on other sites More sharing options...
xPtv45z Posted October 7, 2010 Report Share Posted October 7, 2010 Tev taču ir sertifikāts, ko gan mēs, kas ir bez tāda, tev varam ieteikt. Link to comment Share on other sites More sharing options...
Faks Posted October 10, 2010 Author Report Share Posted October 10, 2010 (edited) Cieninijamā Administrācijia Lūdzu Slēdzat Šo Topiku Ciet . Edited October 10, 2010 by Faks Link to comment Share on other sites More sharing options...
Recommended Posts