Handling a php generated match value for sorting in mysql


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)
Who is Participating?
PortletPaulConnect With a Mentor Commented:
could you provide more detail about your base table(s), some sample data and expected result?

it 'sounds like' something you should be able to do in SQL - but without more information we can't really provide an answer in my view.
YashyAuthor Commented:
hi mate,

this was questioned by our developer and I can't reach him, so I will close this for now and if need be will get him to post more clearly.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.