Snukzz Posted September 27, 2004 Report Share Posted September 27, 2004 Taa, varbuut kaac var pateikt, peec kaada principa visvieglaak ir uzciniit search engiini, kura rokaas pa datu baazi? B) Link to comment Share on other sites More sharing options...
bubu Posted September 27, 2004 Report Share Posted September 27, 2004 Ja datubāze konkrētiem mērķiem veidota, tad visvienkāršāk: SELECT * FROM tabula WHERE lauks LIKE '%ko meklee%' Ja nē, tad var no paša myqsl ar SHOW TABLES / EXPLAIN table dabūt informācīju par visas datubāzēs visiem laukiem un tad veikt meklēšanu pa tiem. Link to comment Share on other sites More sharing options...
Snukzz Posted September 27, 2004 Author Report Share Posted September 27, 2004 paldies! :D Link to comment Share on other sites More sharing options...
Jee Posted September 27, 2004 Report Share Posted September 27, 2004 iemet acis te Link to comment Share on other sites More sharing options...
Snukzz Posted September 28, 2004 Author Report Share Posted September 28, 2004 Turpinot par seerchu, ;) situaacija taada, tabulaa preces konkreetai precei glabaajas kaads ID, kurs CITAA tabulaa ir kaut kaads KATEGORIJAS vai BRENDA noasaukums (nu tip vprecu tabulaa iet ieraksti ID, ARTIKULS, BRENDA_ID u.t.t un brendiem iet ID, NOS... u.t.t), tagad, JAUTAAJUMS, Kaa lai panaak to, lai juuzera ievadiito veertiibu mekleeshanas laukaa atpaziist peec nosaukuma, BET searchs meklee tabulaa PRECES attieciigo brendu, bet tikai peec ID. Velns... nu kaut kaa taa, iisti nezinu kaa tam vajadzeetu darboties, varbuut kaads var apgaismot mani? Link to comment Share on other sites More sharing options...
cuuu Posted September 28, 2004 Report Share Posted September 28, 2004 resp., lai lietotājs var meklēt ne tikai pēc nosaukuma, bet arī pēc brenda? select ... from preces left join brendi on preces.brenda_id = brendi.id where concat(preces.vaards, brendi.vaards) like '%tava mekleejamaa veertiiba%' vai, pareizāk, select ... from preces left join brendi on preces.brenda_id = brendi.id where preces.vaards like '%tava mekleejamaa veertiiba%' or brendi.vaards like '%tava mekleejamaa veertiiba%' Link to comment Share on other sites More sharing options...
Snukzz Posted September 28, 2004 Author Report Share Posted September 28, 2004 nu jaa, tip lai vinsh ievad piem. Tosteris, vai AR82763, SONY un searchs rakaajas padazaadaam tabulaam bet izvada produktus kuriem sakriit ievadiitaa veertiiba! Laikam taa! :huh: Link to comment Share on other sites More sharing options...
Recommended Posts