[Cdash] CDash email notification

Julien Jomier julien.jomier at kitware.com
Sun Mar 30 16:00:10 UTC 2008


Trevor,

> 123:  // Find the users
> 124: $authors = mysql_query("SELECT author FROM updatefile WHERE
> buildid='$buildid'");
> 125:  while($authors_array = mysql_fetch_array($authors))
> 126:    {
> 127:    $author = $authors_array["author"];
> 
> I'm getting to line 123, but not to 127, but if I manually perform a
> query on the database for the buildid (id determined from add_log trace)
> then data is present with me as the author. Logic says that the database
> can't be populated at the time of the query, but this doesn't seem
> likely?

Can you try to add this line after the mysql_query (124):

   add_log(mysql_error(),"sendemail");

I'm wondering if the query is failing because the database connection is 
not created. If this is the case, can you try to add at the beginning of 
the sendemail function:

   $db = mysql_connect("$CDASH_DB_HOST","$CDASH_DB_LOGIN",
                     "$CDASH_DB_PASS");
   mysql_select_db("$CDASH_DB_NAME",$db);

Thanks for tracking this down,
Julien



More information about the CDash mailing list