| Notes | 
	| 
 | 
	| 
		
			| (0020836) |  
			| Julien Jomier |  
			| 2010-05-27 09:41 |  | 
		
			| If you change the following line in manageProjectRoles.php (around line 434) 
 '$sql = "SELECT DISTINCT author,emailtype,email FROM dailyupdate,dailyupdatefile'
 
 by
 
 '$sql = "SELECT DISTINCT author,emailtype,user.email FROM dailyupdate,dailyupdatefile'
 
 (the 'email' becomes 'user.email')
 
 Let me know
 |  | 
	| 
 | 
	| 
		
			| (0020837) |  
			| Hendrik Belitz |  
			| 2010-05-27 09:48 |  | 
		
			| I tried this without any effect. The error persists. |  | 
	| 
 | 
	| 
		
			| (0020838) |  
			| Julien Jomier |  
			| 2010-05-27 09:52 |  | 
		
			| Are you using MySQL or PgSQL? 
 Can you try to add this line after the query:
 
 $query = pdo_query($sql);
 add_last_sql_error('ManageProjectRole'); <-- Add this line
 
 And reload the page. You should get a better description of the error. Thanks!
 |  | 
	| 
 | 
	| 
		
			| (0020840) |  
			| Hendrik Belitz |  
			| 2010-05-27 10:03 |  | 
		
			| I'm using PostgreSQL 8.3. 
 Using the code you suggested leads to the following error message:
 
 SQL error in ManageProjectRole():ERROR: syntax error at ».« LINE 1: SELECT DISTINCT author,emailtype,user.email FROM dailyupdate... ^
 |  | 
	| 
 | 
	| 
		
			| (0020841) |  
			| Julien Jomier |  
			| 2010-05-27 10:12 |  | 
		
			| Ok, try replacing the query by this one: 
 ---
 $sql = "SELECT DISTINCT author,emailtype,".qid("user").".email FROM dailyupdate,dailyupdatefile
 LEFT JOIN user2project ON (dailyupdatefile.author=user2project.cvslogin
 AND user2project.projectid=".qnum($project_array['id'])."
 )
 LEFT JOIN ".qid("user")." ON (user2project.userid=".qid("user").".id)
 WHERE
 dailyupdatefile.dailyupdateid=dailyupdate.id
 AND dailyupdate.projectid=".qnum($project_array['id']).
 " AND dailyupdatefile.checkindate>'".$date."' AND (emailtype=0 OR emailtype IS NULL)";
 ---
 |  | 
	| 
 | 
	| 
		
			| (0020842) |  
			| Hendrik Belitz |  
			| 2010-05-27 10:15 |  | 
		
			| Okay. Now it's working fine. Thank you very much. |  |