mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-03 16:51:40 +09:00
select 쿼리에 list_count=0 파라미터 전달시 Limit 해제
This commit is contained in:
parent
9d7f220417
commit
576c76a0be
2 changed files with 15 additions and 15 deletions
|
|
@ -37,24 +37,25 @@ class Limit
|
|||
* constructor
|
||||
* @param int $list_count
|
||||
* @param int $page
|
||||
* @param int $page_count
|
||||
* @param int $page_count
|
||||
* @param int $offset
|
||||
* @return void
|
||||
*/
|
||||
function __construct($list_count, $page = NULL, $page_count = NULL, $offset = NULL)
|
||||
{
|
||||
$this->list_count = $list_count;
|
||||
if($page)
|
||||
if($list_count->getValue())
|
||||
{
|
||||
$list_count_value = $list_count->getValue();
|
||||
$page_value = $page->getValue();
|
||||
$this->start = ($page_value - 1) * $list_count_value;
|
||||
$this->page_count = $page_count;
|
||||
$this->page = $page;
|
||||
}
|
||||
elseif($offset)
|
||||
{
|
||||
$this->start = $offset->getValue();
|
||||
if($page)
|
||||
{
|
||||
$this->start = ($page->getValue() - 1) * $list_count->getValue();
|
||||
$this->page_count = $page_count;
|
||||
$this->page = $page;
|
||||
}
|
||||
elseif($offset)
|
||||
{
|
||||
$this->start = $offset->getValue();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -86,16 +87,15 @@ class Limit
|
|||
|
||||
function toString()
|
||||
{
|
||||
if($this->page || $this->start)
|
||||
if($this->start)
|
||||
{
|
||||
return $this->start . ' , ' . $this->list_count->getValue();
|
||||
}
|
||||
else
|
||||
{
|
||||
return $this->list_count->getValue();
|
||||
return $this->list_count->getValue() ?: '';
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
/* End of file Limit.class.php */
|
||||
/* Location: ./classes/db/limit/Limit.class.php */
|
||||
|
|
|
|||
|
|
@ -602,7 +602,7 @@ class documentAdminController extends document
|
|||
function deleteModuleDocument($module_srl)
|
||||
{
|
||||
$args = new stdClass;
|
||||
$args->page = 0;
|
||||
$args->list_count = 0;
|
||||
$args->module_srl = intval($module_srl);
|
||||
$document_list = executeQueryArray('document.getDocumentList', $args, array('document_srl'))->data;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue