Vebers Posted December 9, 2005 Report Share Posted December 9, 2005 (edited) Kaa lai uztaisa vienu query no taa, ka ir lauks 'tabula.implode' kuraa ir dati "1||2||5||3" velamais rezultats ir apmeram tads "WHERE id IN (".implode(',', explode('||', 'tabula.implode)).")" Tas maz ir iespejams? jeb jataisa atsevisks pieprasijums tam explode ? Edited December 9, 2005 by MakaTaNaw Link to comment Share on other sites More sharing options...
bubu Posted December 9, 2005 Report Share Posted December 9, 2005 Apliec lauka vērtībām apkārt ||, tb lai dati tajā izskatās šādi: "||1||2||5||3||" Un tad to var panākt ar kveriju: WHERE id LIKE "%||5||%" Bet vispār derētu pamācīties par datubāžu normalizāciju/relācijām un lietot 1:n / n:n relācijas. Link to comment Share on other sites More sharing options...
Vebers Posted December 9, 2005 Author Report Share Posted December 9, 2005 kur par to var pamaaciities? pirmo reizi par k-ko tadu dzirdu.. Link to comment Share on other sites More sharing options...
bubu Posted December 9, 2005 Report Share Posted December 9, 2005 (edited) Ar acīm pārskrēju pāri gūgles rezultātiem. Ar šo iesākumam vajadzētu pietikt: http://www.keithjbrown.co.uk/vworks/mysql/mysql_p7.shtml http://en.wikipedia.org/wiki/Database_normalization http://en.wikipedia.org/wiki/Relational_model Protams, pats vari izmantot ar gūgli keywordus "database normalization" un "relational model". Edited December 9, 2005 by bubu Link to comment Share on other sites More sharing options...
Vebers Posted December 9, 2005 Author Report Share Posted December 9, 2005 Paldies Link to comment Share on other sites More sharing options...
Recommended Posts