php-general Digest 1 Aug 2013 14:23:11 -0000 Issue 8316
Topics (messages 321748 through 321749):
Re: SELECT data base on a upper level SELECT
321748 by: Jim Giner
Sending headers to server
321749 by: Miguel Guedes
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscr...@lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscr...@lists.php.net
To post to the list, e-mail:
php-gene...@lists.php.net
----------------------------------------------------------------------
--- Begin Message ---
On 7/31/2013 9:37 PM, iccsi wrote:
I have 5 SELECT for Department, Manager, supervisor, Group Leader and
Employees
I want to every SELECT list narrow down for an upper SELECT.
For example, once user select Department then all Manager, Supervisor,
Group Leader and Employee list will be narrow down by department and
same for manager and supervisor and so on.
I can use iframe or jQuery to do every level, but it needs to call
iframe or jQuery to 5 levels.
I would like to know are there any better way to handle this situation,
Your help and information is great appreciated,
Regards,
Iccsi,
How about using just one select and add variables to the where clause?
Set the variable(s) to the values that you want to filter on.
For ex.:
your query is
$sel = 1;
$q = "select Department, Manager, supervisor, Group Leader,Employees
where $sel";
Then when the user selects a department $d:
$sel = "Department = '$d'";
OR if you have selected a department $d and a manager $m:
$sel = "Department ='$d' and Manager='$m'";
One query. A variable 'where' clause.
--- End Message ---
--- Begin Message ---
Hello List,
I'm running PHP 5.4.9 as CGI (via apache 2.2.22) and can't seem to be
able to send headers to the server.
Both,
header('Status: 500 Internal Server Error');
and,
header('HTTP/1.1 500 Internal Server Error', true, 500);
result in nothing happening on the client side.
What am I missing?
--- End Message ---