Right, I'll be specific as possible here - I'll first outline what I need, then what I've done - I can usually plod on with these so bear in mind I'm only asking as my brain is fried!
I have a table in my database - we only need to know it has these fields (gender - male or female, layout - 0 or 1)
-
I want to find the most used layout (0 or 1) for males - I've done this by:
$result = mysqli_query($conn, "SELECT layout,COUNT(*) as num FROM style where gender = 'male' group by layout order by num DESC LIMIT 1" );
I want to check if the returned result (so most frequent) is 0 or 1, so i can use that in an
IF
statement (so far i'm just using an echo to test)
I'm sorry if this if very trivial, or if i've missed anything out - if you need any extra info let me know.