Commit 14561bc0 authored by Claude Brisson's avatar Claude Brisson

Filter visible projects

parent 56dedab6
......@@ -45,6 +45,7 @@ CREATE TABLE `project` (
`pr_id` int(11) NOT NULL AUTO_INCREMENT,
`cl_id` int(11) DEFAULT NULL,
`name` varchar(100) DEFAULT NULL,
`active` tinyint(1) DEFAULT '1',
PRIMARY KEY (`pr_id`),
KEY `cl_id` (`cl_id`),
CONSTRAINT `project_ibfk_1` FOREIGN KEY (`cl_id`) REFERENCES `client` (`cl_id`)
......
......@@ -37,7 +37,7 @@ void TimeSlice::readProjects()
conn.set_option(scno);
conn.connect(TS_DB, TS_HOST, TS_USER, TS_PASSWORD);
mysqlpp::Query query = conn.query();
query << "SELECT pr_id, name FROM project ORDER BY name";
query << "SELECT pr_id, name FROM project WHERE visible ORDER BY name";
mysqlpp::StoreQueryResult res = query.store();
if (res && res.num_rows())
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment