mich21
Feb 18th 2008, 12:13 am
I have an array of id's(array1) each with corresponding hits(array2).
Im using an imploded array1 to select ids from a table.
like so:
select * from table where id in $array1;
Now i want to add the corresponding hits of each id in the query result.
The problem is that the result is automatically ordered by id ASC. So when i add my hits to the result, they do not match with the id's. How can i achieve this? Thanks in advance :)
Im using an imploded array1 to select ids from a table.
like so:
select * from table where id in $array1;
Now i want to add the corresponding hits of each id in the query result.
The problem is that the result is automatically ordered by id ASC. So when i add my hits to the result, they do not match with the id's. How can i achieve this? Thanks in advance :)