Similar to 58 this conditional filtering through the PHP program how to achieve, who told, through the stupid method can be achieved, but that is too time-consuming and redundant code more, do not know which master can have a better way, thank you!
Reply to discussion (solution)
Why no one?
What is the method of the stupid method?
This requirement, splicing the filter conditions can be achieved, such as without any conditions
If you select an area, the SQL statement becomes
When you choose a method, the SQL statement becomes
A variety of conditions have been spelled out after the SQL statement.
You can consider URL parameters, or consider writing directly to a cookie or session, and then assemble SQL for the existing data. I think so, but it depends on the demand.
It seems that there are very few answers.
Still no one, which heroes help, thank you
In fact, the problem is very large, the server and the client are involved in the
How the server is primarily generating query statements
How the client determines the style of the value passed
And you do not say any specific requirements, and then people add you a book?
Ajax or Frame click submit Once
A form like this?
Then you can assemble SQL
In fact, the problem is very large, the server and the client are involved in the
How the server is primarily generating query statements
How the client determines the style of the value passed
And you do not say any specific requirements, and then people add you a book?
Landlord, Concrete I have already written out, now is mainly data splitting, can go to www.0971my.com/wskh.php above look
Highly recommended Php+sphinx you deserve to have
I've had one before, so you can see for yourself.
Remove the GET parameter if (isset ($_get[' act ')) { $k = substr ($_get[' act '], 3); unset ($_get[' act '); if ($k = = ' All ') $_get = Array (); else unset ($_get[$k]);} /* Get get parameter */function GetParam ($k) { $param = $_get; if (Isset ($_get[$k])) unset ($param [$k]); $param [$k] = '; Return Http_build_query ($param);}
This $param usage, '. $quyu [' title ']. '
The rest is to spell the SQL statement.