|
@@ -19,30 +19,30 @@ use think\Exception;
|
|
|
*/
|
|
|
class Builder extends BaseBuilder
|
|
|
{
|
|
|
- protected $selectSql = 'SELECT * FROM (SELECT thinkphp.*, rownum AS numrow FROM (SELECT %DISTINCT% %FIELD% FROM %TABLE%%JOIN%%WHERE%%GROUP%%HAVING%%ORDER%) thinkphp ) %LIMIT%%COMMENT%';
|
|
|
-
|
|
|
- /**
|
|
|
- * limit分析
|
|
|
- * @access protected
|
|
|
- * @param Query $query 查询对象
|
|
|
- * @param mixed $limit
|
|
|
- * @return string
|
|
|
- */
|
|
|
- protected function parseLimit(Query $query, $limit)
|
|
|
- {
|
|
|
- $limitStr = '';
|
|
|
- if (!empty($limit)) {
|
|
|
- $limit = explode(',', $limit);
|
|
|
- if (count($limit) > 1) {
|
|
|
- $limitStr = "(numrow>" . $limit[0] . ") AND (numrow<=" . ($limit[0] + $limit[1]) . ")";
|
|
|
- } else {
|
|
|
- $limitStr = "(numrow>0 AND numrow<=" . $limit[0] . ")";
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- return $limitStr ? ' WHERE ' . $limitStr : '';
|
|
|
- }
|
|
|
+// protected $selectSql = 'SELECT * FROM (SELECT thinkphp.*, rownum AS numrow FROM (SELECT %DISTINCT% %FIELD% FROM %TABLE%%JOIN%%WHERE%%GROUP%%HAVING%%ORDER%) thinkphp ) %LIMIT%%COMMENT%';
|
|
|
+//
|
|
|
+// /**
|
|
|
+// * limit分析
|
|
|
+// * @access protected
|
|
|
+// * @param Query $query 查询对象
|
|
|
+// * @param mixed $limit
|
|
|
+// * @return string
|
|
|
+// */
|
|
|
+// protected function parseLimit(Query $query, $limit)
|
|
|
+// {
|
|
|
+// $limitStr = '';
|
|
|
+// if (!empty($limit)) {
|
|
|
+// $limit = explode(',', $limit);
|
|
|
+// if (count($limit) > 1) {
|
|
|
+// $limitStr = "(numrow>" . $limit[0] . ") AND (numrow<=" . ($limit[0] + $limit[1]) . ")";
|
|
|
+// } else {
|
|
|
+// $limitStr = "(numrow>0 AND numrow<=" . $limit[0] . ")";
|
|
|
+// }
|
|
|
+//
|
|
|
+// }
|
|
|
+//
|
|
|
+// return $limitStr ? ' WHERE ' . $limitStr : '';
|
|
|
+// }
|
|
|
|
|
|
/**
|
|
|
* 设置锁机制
|