Select single dropdown with where clause

ryno

New member
System info

PHP Version: 7.4.10

mysql version: 8.0.21-0ubuntu0.20.04.4

Web server: Apache/2.4.41 (Ubuntu)

Client: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:80.0) Gecko/20100101 Firefox/80.0


Good morning,

Could you please assist, i am currently busy with a field that is an IP address, i have made the field type select single and added my IP list table as my lookup table. My where status="free" clause ensures that only free IP's are displayed as a select-able option. The problem is the curent IP field value (if not empty) cannot be displayed because of my WHERE clause when I edit the record. I need a method to display the filled in fields value regardless of my WHERE claue and have only the other selectable options adhere to my where clause.
 

eugenio

Administrator
Staff member
Hello,
so basically you need a different filter when you are inserting a new record Vs. when you are editing a record?

At the moment it is not possible, but even if it was, I don't think this would be a solution, during editing I could choose a "non free" ip and save.

Best,
 
Top