When the user login, my auth-code save some information in a session, one of these information is the user flag.
I have 3 tables:
I verify the login/pass in [user_data], so, I start to record the session. I record:
My problem is with the flag.. A flag just have a group_id with it. So, i was using a INNER JOIN to retrieve this flag_id, but not so happy, something was wrong.
$str_sql = ' SELECT user_flag.id AS id FROM ( user_flag INNER JOIN ( user_group INNER JOIN user_data ON user_group.id = user_data.id_group ) ON user_flag.id_group = user_group.id ) WHERE user_data.id = '. $int_id .' LIMIT 1 ';So, if someone know what I do wrong, I will be greatful, I'm new in mysql.. ^^"!