Quote from
Gaev on August 5, 2020, 10:05 pm
@ gustavo1973
Let us suppose that the fields in question are hasWifi and hasTV etc.
If the renter requests homes with Wifi but does not care if it has TV ... working back from the SQL commands ...
Your SQL SELECT statement would look like ...
WHERE (hasWifi='Yes' OR hasWifi='Yes') AND (hasTV='Yes' OR hasTV='No');
So your $sqlQuerys statement would look something like ...
$sqlQuerys[0]="SELECT * from yourTableNameHere WHERE (hasWifi=? OR hasWifi=?) AND (hasTV=? OR hasTV=?);
... and your neoPhpExecSql would be something like ...
neoPhpExecSql "yourDatabaseNameHere" "yourTableNameHere" "[wifi1]::[wifi2]::[TV1]::[TV2]"
... and since renter selected Yes for wifi and No for TV ...
a) [wifi1] and [wifi2] would be set to Yes
b) [TV1] would be Yes and [TV2] would be No
Note: I have not tried (verified) all this ... let us know if it worked as anticipated.
@ gustavo1973
Let us suppose that the fields in question are hasWifi and hasTV etc.
If the renter requests homes with Wifi but does not care if it has TV ... working back from the SQL commands ...
Your SQL SELECT statement would look like ...
WHERE (hasWifi='Yes' OR hasWifi='Yes') AND (hasTV='Yes' OR hasTV='No');
So your $sqlQuerys statement would look something like ...
$sqlQuerys[0]="SELECT * from yourTableNameHere WHERE (hasWifi=? OR hasWifi=?) AND (hasTV=? OR hasTV=?);
... and your neoPhpExecSql would be something like ...
neoPhpExecSql "yourDatabaseNameHere" "yourTableNameHere" "[wifi1]::[wifi2]::[TV1]::[TV2]"
... and since renter selected Yes for wifi and No for TV ...
a) [wifi1] and [wifi2] would be set to Yes
b) [TV1] would be Yes and [TV2] would be No
Note: I have not tried (verified) all this ... let us know if it worked as anticipated.