So how about some examples of using it? The following code generated the sample
box above directly from the database. To be honest, I ripped this directly out of the
task manager that I wrote for SourceForge. It's OK, because VA Linux is GPLing all of this
code anyway.
<?php
/*
List of possible users that this one could be assigned to
*/
$sql="SELECT user.user_id,user.user_name ".
"FROM user,user_group WHERE user.user_id=user_group.user_id ".
"AND user_group.group_id='$group_id' AND user_group.project_flags IN (1,2)";
$result3=db_query($sql);
/*
Get the list of ids this is assigned to and convert to array
to pass into multiple select box
*/
$result2=db_query("SELECT assigned_to_id FROM project_assigned_to WHERE project_task_id='$project_task_id'");