Troxy Posted February 14, 2007 Report Share Posted February 14, 2007 Kads buutu idealais variants Tabula prieksh Zinnam ID|Virsraksts|Texts|Autors|??|???| Kas veel buutu nepiecieshams,ja velak gribeetu pielikt lai shii sziņas vareetu komenteet, Komentaariem atsevishku tabulu??ja gadijuma bus citas sadalas kuraas ar laiku gribeeshu pievienot komentaarus Aptuveno izzskatu ka veidot Cerams saprataat ko es te murgoju :) .. isak sakot bus jaunumu sadala: Un shinii sadalaa ar laiku gribeshu pievienot komentaarus buus vel kaukaada sadalla : Un arii shinii sadalaa gribeshu pievienot komentarus Kadai jaizskatas Tabulai Link to comment Share on other sites More sharing options...
Val Posted February 14, 2007 Report Share Posted February 14, 2007 vēl var jaunuma pievienošanas datumu, laiku pielikt. Komentāriem atsevišķa tabula. ziņas id arī būs vajadzīgs, lai zinātu, kurai ziņai pēctam gribi atlasīt to komentārus. pārējos laukus izdomā pats Link to comment Share on other sites More sharing options...
Troxy Posted February 14, 2007 Author Report Share Posted February 14, 2007 brr bik neiebraucu par to zinnas id??? Link to comment Share on other sites More sharing options...
Val Posted February 14, 2007 Report Share Posted February 14, 2007 Lai iegūtu attiecīgās ziņas [101] komentārus, tev vajadzēs uzveidot sql query ar nosacījumu (piem. where zinas_id=101) un tad iegūsi tikai tās ziņas komentārus, nevis visus iespējamos. Link to comment Share on other sites More sharing options...
Troxy Posted February 14, 2007 Author Report Share Posted February 14, 2007 Tad tas bus shaadi ID|ZinasID|Virsraksts|Texts|Autors|Datums| ? Link to comment Share on other sites More sharing options...
Ghenis Posted February 14, 2007 Report Share Posted February 14, 2007 Mans variants news ID | text | title | date | author | com_possible | cat cats ID | title comments ID | owner | date | text | IP | author authors //Pienjemot, ka autori ir lietotaaji, kas var kaut kaadaa admin panelii pieteikties ID | UserName | Password | Link to comment Share on other sites More sharing options...
andrisp Posted February 14, 2007 Report Share Posted February 14, 2007 (edited) Nē, dari tā kā sākumā domāju, un kometāriem taisi šādu tabulu: zinas_id | autors | teksts | datums | utt Tad, piemēram, ja ziņai id ir 3, tad visus komentārus šai ziņai no tās tabulas varēsi iegūt šādi: SELECT * FROM komentari WHERE zinas_id = 3 ORDER BY datums DESC Ghenis, kas tavā komentu tabulā ir owner ? Edited February 14, 2007 by andrisp Link to comment Share on other sites More sharing options...
Ghenis Posted February 14, 2007 Report Share Posted February 14, 2007 komentaara maates raksts. Link to comment Share on other sites More sharing options...
Joyride Posted February 14, 2007 Report Share Posted February 14, 2007 Vel var pielikt published(datetime) lauku, kurs noraditu, kad zinu paradit, piemeram, tu pievieno zinu sodien(14.02.2007), bet velies paradit, sakot tikai no ritdienas (15.02.2007). Link to comment Share on other sites More sharing options...
andrisp Posted February 14, 2007 Report Share Posted February 14, 2007 Ghenis, saprotamāk nebūtu news_id ? :) Link to comment Share on other sites More sharing options...
Ghenis Posted February 14, 2007 Report Share Posted February 14, 2007 nez, man kaut kaa sirdij tuvaaka shkjiet taa iipashnieku buushana ... Link to comment Share on other sites More sharing options...
Troxy Posted February 14, 2007 Author Report Share Posted February 14, 2007 a un ta pie reizes pienemsim man taads jautaajums ka pareizi izvadiit no DB aptuveni shaadi http://paste.php.lv/5136 var buut tas izskatiisies smiekliigi tas ir tikai uzmetums Link to comment Share on other sites More sharing options...
andrisp Posted February 14, 2007 Report Share Posted February 14, 2007 Troxy, kur problēma ? Tas kods nestrādā ? Tad tā arī saki, ja tā ir. PS. Maziņš padomiņš - varbūt vari iztikt bez tabulām tur ? Link to comment Share on other sites More sharing options...
Troxy Posted February 14, 2007 Author Report Share Posted February 14, 2007 (edited) Ne ne kods stradaa es domaju vai taa ir pareiz ka esmu uzrakstijis? Ok labi bez tabulam bet ka, vienkarshi es taisu sev mazu lapeli tiiri priekam un lai apguutu php sql utt Ka tu domaji bez tabulaam? A un ja varat pasakat kur vai kaa nu grubu pielikt nu to fiichu zinu rakstiishanaii utt Laikam kaukads html editors vai ka ta. Edited February 14, 2007 by Troxy Link to comment Share on other sites More sharing options...
Ghenis Posted February 14, 2007 Report Share Posted February 14, 2007 (edited) http://paste.php.lv/5137 Troxy, TinyMCE + vienkaarsh insert. Edited February 14, 2007 by Ghenis Link to comment Share on other sites More sharing options...
Recommended Posts