0
안녕하세요 저는 다음과 같은 쿼리를 가지고 있지만, 아직 나에게주지 않는 결과를줍니다. 이게 뭐가 잘못 됐니?mysql이 성명서에서 작동하지 않습니다.
select taxonomic_units.tsn, hierarchy.hierarchy_string, hierarchy.TSN, taxonomic_units.rank_id from hierarchy left join taxonomic_units on hierarchy.TSN = taxonomic_units.tsn where taxonomic_units.rank_id = 220 and hierarchy.hierarchy_string LIKE '%180211%' and taxonomic_units.tsn not in ('180212') order by rand() limit 1
select taxonomic_units.tsn, hierarchy.hierarchy_string, hierarchy.TSN, taxonomic_units.rank_id from hierarchy left join taxonomic_units on hierarchy.TSN = taxonomic_units.tsn where taxonomic_units.rank_id = 220 and hierarchy.hierarchy_string LIKE '%180210%' and taxonomic_units.tsn not in ('180212,573165') order by rand() limit 1
select taxonomic_units.tsn, hierarchy.hierarchy_string, hierarchy.TSN, taxonomic_units.rank_id from hierarchy left join taxonomic_units on hierarchy.TSN = taxonomic_units.tsn where taxonomic_units.rank_id = 220 and hierarchy.hierarchy_string LIKE '%180130%' and taxonomic_units.tsn not in ('180212,573165,573165') order by rand() limit 1
select taxonomic_units.tsn, hierarchy.hierarchy_string, hierarchy.TSN, taxonomic_units.rank_id from hierarchy left join taxonomic_units on hierarchy.TSN = taxonomic_units.tsn where taxonomic_units.rank_id = 220 and hierarchy.hierarchy_string LIKE '%179913%' and taxonomic_units.tsn not in ('180212,573165,573165,585192') order by rand() limit 1
select taxonomic_units.tsn, hierarchy.hierarchy_string, hierarchy.TSN, taxonomic_units.rank_id from hierarchy left join taxonomic_units on hierarchy.TSN = taxonomic_units.tsn where taxonomic_units.rank_id = 220 and hierarchy.hierarchy_string LIKE '%158852%' and taxonomic_units.tsn not in ('180212,573165,573165,585192,624896') order by rand() limit 1
여기에 중복으로 결과입니다, 내는 성명에서 사람들을 걸러 생각하지만 나던 아니었다.
0 180212
1 573165
2 573165
3 632899
4 632141
5 647171
그는 분명히 다음 번호를 알지 못합니다. –
@ YourCommonSense 그러나 출력 결과에 따르면 이러한 유형이어야하므로 잘못된 것은 아닙니다. downvote 필요 없음. –
어떻게 PHP에서이 작업을 수행 할 수 있습니까? 이거? " ''. implode (" ','", $ myArray). " '"; – user2604754