i am trying to write an sql statement that will select items from one table and order it by the result of the other table..
the 2 tables are:
events:
id, name
attendance:
user, event
ive got this statement:
SELECT *
FROM `attendance`
WHERE event='1'
AND user IN (1,2,3,4,5,6,7,8,9,10,11,12,13,444,153)
I am using this to get the number of friends that coming to event number 1.
now I want to combine that statement with another one to create a statement that select all the events, and order it by the number of friends that going…
how can i write that statement?
Thank you very much, Amir.
I would try something like this:
However, although I would try something like that, fact is I haven’t, so this might not work as is.