We currently have a matches system between two types of our users.
We run our match generator via PHP that outputs a percentage value.
The problem we are having is getting the value and using it within a query lower down the page in order to use the percentage value in a ORDER BY statement.
We first thought we could use a temp table and then inner join it to the data being selected from the database and although we have matching primary keys the temp table will not inner join.
Is there anyone with any suggestions.
Otherwise it will mean that we will have to set up a table to manage this separately. One row per user, per match with another user.
(A not preferred solution due to the number of rows that will be inserted)