大家讲道理2017-04-18 10:46:56
Why can’t we judge the two query variables before executing the SQL statement?
The pseudo code is as follows:
if (isNull(a)) {
a = '';
}
if (isNull(b)) {
b = '';
}
阿神2017-04-18 10:46:56
From the perspective of efficiency, it is strongly recommended that when name or method is empty, the value will not be used as a query condition
For example, if name is empty, it is directlywhere method like '%xxx%'