$week_leave = mysql_query("select count(id),leave.id from `leave`, `users` where leave.backgroundColor = 'Green' and leave.id=(select U_id from `users` where users.username='$_SESSION['username']')");
Gives the following error:
Parse error: syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING)
I know the problem lies in the sub query. Any suggestions ?