store functional components in database
This commit is contained in:
@@ -74,13 +74,13 @@ METHOD(pts_database_t, create_comp_evid_enumerator, enumerator_t*,
|
||||
{
|
||||
enumerator_t *e;
|
||||
|
||||
/* look for all entries belonging to a product in the files table */
|
||||
/* look for all entries belonging to a product in the components table */
|
||||
e = this->db->query(this->db,
|
||||
"SELECT f.path FROM files AS f "
|
||||
"JOIN product_file AS pf ON f.id = pf.file "
|
||||
"JOIN products AS p ON p.id = pf.product "
|
||||
"WHERE p.name = ? AND f.component = 1",
|
||||
DB_TEXT, product, DB_TEXT);
|
||||
"SELECT c.vendor_id, c.name, c.qualifier FROM components AS c "
|
||||
"JOIN product_component AS pc ON c.id = pc.component "
|
||||
"JOIN products AS p ON p.id = pc.product "
|
||||
"WHERE p.name = ? ORDER BY pf.order",
|
||||
DB_TEXT, product, DB_INT, DB_INT, DB_INT);
|
||||
return e;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user