I have placed some filters into DBMan so that certain records will not display for certain users, or if a certain date has passed, etc. To do this I have the following code in sub_query of db.cgi:
next LINE if ($today > &date_to_unix($values[$removedate]) and !$per_mod);
next LINE if ($values[$class] eq "Academic Faculty" and $per_staff);
These lines work! If I print the values above that I was doing the conditions on, they print the values for each record of the database. I am trying to add another filter that will allow each record to have an active or inactive status with the following code:
next LINE if ($values[$active] eq "No" and $per_view);
It does not work, and when I print out $values[$active], instead of printing a "Yes" or "No" value, it prints the ID # of the record?! I can't figure out why the other conditions work and this one doesnt. Any ideas?? Help!
next LINE if ($today > &date_to_unix($values[$removedate]) and !$per_mod);
next LINE if ($values[$class] eq "Academic Faculty" and $per_staff);
These lines work! If I print the values above that I was doing the conditions on, they print the values for each record of the database. I am trying to add another filter that will allow each record to have an active or inactive status with the following code:
next LINE if ($values[$active] eq "No" and $per_view);
It does not work, and when I print out $values[$active], instead of printing a "Yes" or "No" value, it prints the ID # of the record?! I can't figure out why the other conditions work and this one doesnt. Any ideas?? Help!