This topic is locked

Using the Where Clause

4/1/2009 2:02:58 AM
PHPRunner General questions
D
darkshadow_jm author

How can I filter items in a DROPDOWN list, using the where clause.

The information being filtered is dependent on a object in the same form
eg:

Company Table:-

Company: <companyid> (this is a dropdown list)
Equipment Table:-

model : <model_desc> (this is a dropdown list dependent on the <companyid>

Serial: <serialid> (this is a dropdown list which is dependent on the <model_desc>
I get all the <serial> ok. But some of the <serial> donot belong to the <companyid> so i wanted to use the Where Clause to filter based on the selected <companyid>. But all the syntax that I have tried gives and error.
I guess the question is, how do i pickup a value that has been selected on the same page and assign it to the where clause?

J
Jane 4/1/2009

Hi,
I suppose you need to set up dependent dropdown boxes.

Please have a look at the How to setup dependent dropdown boxes on Edit/Add pages tutorial:

http://www.xlinesoft.com/phprunner/php-database.htm