Dear list,
I want to display the result of the some mysql query differently ..
I have a mysql table(allreps_orgs) with 2500,000 entries.
QUERY IS:
select distinct * from
allreps_orgs as p1,allreps_orgs as p2,
where p1.organism='Plasmodium' AND p2.organism='Caenorhabditis'
AND p1.repeat=p2.repeat;
----------
It displays the result correctly. But it joins two entries having same
values in repeat coloum.
the typical result row looks like this.
|16804919|LKEKE|5|2|Plasmodium|1|155|22329777|LKEKE|5|2|Caenorhabditis|4|234|
In which first 7 columns are coming from one row and next 7 are from
another row which are satisfying the condition.
I want these to be displayed in two different rows (first 7 in row 1 and
second 7 in row 2). Is it possible to that.
I could do it by displaying p1.* and p2.* in two different quries. But
that doubles the querying time. Any other suggestions or pointers.
following is my table structure.
Note: i compare blob filed which is indexed in first 10 char.
+----------+------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+----------+------------------+------+-----+---------+-------+
| prot_id | varchar(15) | YES | MUL | NULL | |
| repeat | blob | YES | MUL | NULL | |
| size_rep | int(10) unsigned | YES | | NULL | |
| freq | varchar(5) | YES | | NULL | |
| organism | varchar(100) | YES | | NULL | |
| version | char(3) | YES | | NULL | |
| cordis | blob | YES | | NULL | |