For example, if queue_watch shows 0, I want the actual mysql output to say no, otherwise say yes. Changing the schema is not an option.
SELECT user.user_name, queue.queue_name, queue_access.queue_access,
queue_access.queue_watch
FROM queue_access
INNER JOIN user ON user.user_id = queue_access.user_id
INNER JOIN queue ON queue.queue_id = queue_access.queue_id
WHERE queue_access <> '' OR queue_watch = 1
ORDER BY user_name;
SQL works for what I need, but I like to know if changing output is possible using SQL, not PHP. Also, is it possible to group all the queues on the same line with each username, so I don't need to return 153 lines.
thank
source
share