Snukzz Posted December 3, 2004 Author Report Share Posted December 3, 2004 UN....kaa.....lai.....vinju piespiez izvadiit + un miinusus un tekstus??? Link to comment Share on other sites More sharing options...
john.brown Posted December 3, 2004 Report Share Posted December 3, 2004 foreach($apply as $param) { echo '<li>'.$dict[$param].': '; if($r[$param]=='') { echo '–-'; } else { echo $r[$param]; } echo '</li>'; } Link to comment Share on other sites More sharing options...
bubu Posted December 3, 2004 Report Share Posted December 3, 2004 nu a man tipa nav... B) Ak, nu ja jau ir, tad selektē tikai tos ierakstus, kuriem to fīču lauks ir aizpildīts, nevis visus pēc kārtas, un tad php domā, kas jāizvada un kas nē. Link to comment Share on other sites More sharing options...
Snukzz Posted December 3, 2004 Author Report Share Posted December 3, 2004 (edited) nu taa jau es arii gribu B), tikai nezinu kaa lai to panaak! :ph34r: Edited December 3, 2004 by Snukzz Link to comment Share on other sites More sharing options...
bubu Posted December 3, 2004 Report Share Posted December 3, 2004 iedod tabulu struktūras. Link to comment Share on other sites More sharing options...
Snukzz Posted December 3, 2004 Author Report Share Posted December 3, 2004 SQL derees? ;) features preces Link to comment Share on other sites More sharing options...
bubu Posted December 3, 2004 Report Share Posted December 3, 2004 (edited) Tev jau nav tāda struktūra kādu es teicu! Tev ir 1:n nevis n:n struktūra! Tev vajadzēja tās features likt šādā tabulā: feat_ID, prece_ID, feat_name, feat_value Un tajā likt datus: (1, 1, "av_in", "true") utt tad varētu vienkārši selektēt tās features kuras ir konkrētai precei! Arī ja kautkas pamainītos tajā specifikācijā (nāktu klāt / ietu nost kāda fīča) nebūtu problēmas pamainīt datus, bet tagad vajadzēs visu tabulu restrukturizēt! Edited December 3, 2004 by bubu Link to comment Share on other sites More sharing options...
Snukzz Posted December 3, 2004 Author Report Share Posted December 3, 2004 Nu jaa... bija taada doma... karoc pameginaashu! ;) Thanks! :D Link to comment Share on other sites More sharing options...
Snukzz Posted December 3, 2004 Author Report Share Posted December 3, 2004 Eeee...bet paga....bet kaa lai realizee to, ka pievienojot jaunu produktu tiek piedaavaats atkjekseet konkreetus laucinjus un atseviskos laucinjos ierakstiit veertiiibas???!!!? RESP. no kaa tad es raushu fiichas kuras glabaajaas ar attieciigaa produkta ID? Jaataisa kaut kaads '0' produkts kuram ir visas fiichas vai? Es iisti nesapratu! Paskaidro ja vari! :rolleyes: Link to comment Share on other sites More sharing options...
bubu Posted December 3, 2004 Report Share Posted December 3, 2004 (edited) Nu tur vajag vēlvienu tabulu, kurai ir 1:n atteicības ar features un products tabulām, kurā glabāsies nepieciešamās fīčas. tb: (product_type, feature_ID). Tas type piemēram varētu būt "televizors", "ledusskapis", "dvd pleijers", utt, vai arī ārējā atslēga uz produktu lista tabulu. Tu pirms programmēšanas uz papīra ER modeļus pazīmēji vispār? Edited December 3, 2004 by bubu Link to comment Share on other sites More sharing options...
Snukzz Posted December 3, 2004 Author Report Share Posted December 3, 2004 (edited) Nepaziimeeju, bet sanaak ka vajadzeeja.... :P Skaidrs skaidrs... par sitaadu shtelli esmu urbies! :P vot taa ir ka regulaari neprogrammee... njemiet piemeru no manis - PROGRAMMEEJIET VAIRAAK! :lol: Edited December 3, 2004 by Snukzz Link to comment Share on other sites More sharing options...
bubu Posted December 3, 2004 Report Share Posted December 3, 2004 Šī nav programmēšana, šī ir projektēšana. Link to comment Share on other sites More sharing options...
Snukzz Posted December 6, 2004 Author Report Share Posted December 6, 2004 labi labi...nepiekasies :D Link to comment Share on other sites More sharing options...
Snukzz Posted December 6, 2004 Author Report Share Posted December 6, 2004 (edited) :huh: ....nu taaa.... shitik taalu tiku.... <TABLE> <?php $prece_id=user_num($_GET['prece']); $f_res=mysql_query('SELECT * FROM pro_feat WHERE preces_ID ='.$prece_id); while($f_row=mysql_fetch_row($f_res)){ ?> <TR><TD><?=$f_row[0]?></TD></TR> <? } ?> </TABLE> Kaa lai dabuu tabulaa "pro_feat" noraadiitaas fiicas aaraa no tabulas "features"??? :blink: Edited December 6, 2004 by Snukzz Link to comment Share on other sites More sharing options...
bubu Posted December 6, 2004 Report Share Posted December 6, 2004 Tabulu struktūru nepateiksi, vai arī mums atkal jāzīlē kafijas biezumos būs? Link to comment Share on other sites More sharing options...
Recommended Posts