/** * @param int $SingleID * @param array(int) $MultipleIDs * @param int $SingleSetID * @param array(int) $MultipleSetIDs * @param int $SingleModelID * @param array(int) $MultipleModelIDs * @param bool $OrAllMultipleIDs */ public function __construct($SingleID = FALSE, $MultipleIDs = FALSE, $SingleSetID = FALSE, $MultipleSetIDs = FALSE, $SingleModelID = FALSE, $MultipleModelIDs = FALSE, $OrAllMultipleIDs = FALSE) { parent::__construct(); if ($SingleID !== FALSE) { $this->paramtypes .= "i"; $this->values[] = $SingleID; $this->where .= " AND video_id = ?"; } if (is_array($MultipleIDs) && count($MultipleIDs) > 0 && !$OrAllMultipleIDs) { $this->paramtypes .= str_repeat('i', count($MultipleIDs)); $this->values = array_merge($this->values, $MultipleIDs); $this->where .= sprintf(" AND video_id IN ( %1s ) ", implode(', ', array_fill(0, count($MultipleIDs), '?'))); } if ($SingleSetID !== FALSE) { $this->paramtypes .= "i"; $this->values[] = $SingleSetID; $this->where .= " AND set_id = ?"; } if (is_array($MultipleSetIDs) && count($MultipleSetIDs) > 0 && !$OrAllMultipleIDs) { $this->paramtypes .= str_repeat('i', count($MultipleSetIDs)); $this->values = array_merge($this->values, $MultipleSetIDs); $this->where .= sprintf(" AND set_id IN ( %1s ) ", implode(', ', array_fill(0, count($MultipleSetIDs), '?'))); } if ($SingleModelID !== FALSE) { $this->paramtypes .= "i"; $this->values[] = $SingleModelID; $this->where .= " AND model_id = ?"; } if (is_array($MultipleModelIDs) && count($MultipleModelIDs) > 0 && !$OrAllMultipleIDs) { $this->paramtypes .= str_repeat('i', count($MultipleModelIDs)); $this->values = array_merge($this->values, $MultipleModelIDs); $this->where .= sprintf(" AND model_id IN ( %1s ) ", implode(', ', array_fill(0, count($MultipleModelIDs), '?'))); } if ($OrAllMultipleIDs) { $pieces = array(); if (is_array($MultipleIDs) && count($MultipleIDs) > 0) { $this->paramtypes .= str_repeat('i', count($MultipleIDs)); $this->values = array_merge($this->values, $MultipleIDs); $pieces[] = sprintf("video_id IN ( %1s )", implode(', ', array_fill(0, count($MultipleIDs), '?'))); } if (is_array($MultipleSetIDs) && count($MultipleSetIDs) > 0) { $this->paramtypes .= str_repeat('i', count($MultipleSetIDs)); $this->values = array_merge($this->values, $MultipleSetIDs); $pieces[] = sprintf("set_id IN ( %1s )", implode(', ', array_fill(0, count($MultipleSetIDs), '?'))); } if (is_array($MultipleModelIDs) && count($MultipleModelIDs) > 0) { $this->paramtypes .= str_repeat('i', count($MultipleModelIDs)); $this->values = array_merge($this->values, $MultipleModelIDs); $pieces[] = sprintf("model_id IN ( %1s )", implode(', ', array_fill(0, count($MultipleModelIDs), '?'))); } if ($pieces) { $this->where .= " AND ("; $this->where .= implode(' OR ', $pieces); $this->where .= ")"; } } }
/** * @param string $SingleID * @param array(string) $MultipleIDs * @param int $SingleIndexID * @param array(int) $MultipleIndexIDs * @param int $SingleModelID * @param array(int) $MultipleModelIDs * @param int $SingleSetID * @param array(int) $MultipleSetIDs * @param int $SingleImageID * @param array(int) $MultipleImageIDs * @param int $SingleVideoID * @param array(int) $MultipleVideoIDs * @param int $CacheImageWidth * @param int $CacheImageHeight * @param int $IndexSequenceNumber * @param int $IndexSequenceTotal */ public function __construct($SingleID = FALSE, $MultipleIDs = FALSE, $SingleIndexID = FALSE, $MultipleIndexIDs = FALSE, $SingleModelID = FALSE, $MultipleModelIDs = FALSE, $SingleSetID = FALSE, $MultipleSetIDs = FALSE, $SingleImageID = FALSE, $MultipleImageIDs = FALSE, $SingleVideoID = FALSE, $MultipleVideoIDs = FALSE, $CacheImageWidth = FALSE, $CacheImageHeight = FALSE, $IndexSequenceNumber = FALSE, $IndexSequenceTotal = FALSE) { parent::__construct(); if ($SingleID !== FALSE) { $this->paramtypes .= "s"; $this->values[] = $SingleID; $this->where .= " AND cache_id = ?"; } if (is_array($MultipleIDs) && count($MultipleIDs) > 0) { $this->paramtypes .= str_repeat('s', count($MultipleIDs)); $this->values = array_merge($this->values, $MultipleIDs); $this->where .= sprintf(" AND cache_id IN ( %1s ) ", implode(', ', array_fill(0, count($MultipleIDs), '?'))); } if ($SingleIndexID !== FALSE) { $this->paramtypes .= "i"; $this->values[] = $SingleIndexID; $this->where .= " AND index_id = ?"; } if (is_array($MultipleIndexIDs) && count($MultipleIndexIDs) > 0) { $this->paramtypes .= str_repeat('i', count($MultipleIndexIDs)); $this->values = array_merge($this->values, $MultipleIndexIDs); $this->where .= sprintf(" AND index_id IN ( %1s ) ", implode(', ', array_fill(0, count($MultipleIndexIDs), '?'))); } if ($SingleModelID !== FALSE) { $this->paramtypes .= "i"; $this->values[] = $SingleModelID; $this->where .= " AND model_id = ?"; } if (is_array($MultipleModelIDs) && count($MultipleModelIDs) > 0) { $this->paramtypes .= str_repeat('i', count($MultipleModelIDs)); $this->values = array_merge($this->values, $MultipleModelIDs); $this->where .= sprintf(" AND model_id IN ( %1s ) ", implode(', ', array_fill(0, count($MultipleModelIDs), '?'))); } if ($SingleSetID !== FALSE) { $this->paramtypes .= "i"; $this->values[] = $SingleSetID; $this->where .= " AND set_id = ?"; } if (is_array($MultipleSetIDs) && count($MultipleSetIDs) > 0) { $this->paramtypes .= str_repeat('i', count($MultipleSetIDs)); $this->values = array_merge($this->values, $MultipleSetIDs); $this->where .= sprintf(" AND set_id IN ( %1s ) ", implode(', ', array_fill(0, count($MultipleSetIDs), '?'))); } if ($SingleImageID !== FALSE) { $this->paramtypes .= "i"; $this->values[] = $SingleImageID; $this->where .= " AND image_id = ?"; } if (is_array($MultipleImageIDs) && count($MultipleImageIDs) > 0) { $this->paramtypes .= str_repeat('i', count($MultipleImageIDs)); $this->values = array_merge($this->values, $MultipleImageIDs); $this->where .= sprintf(" AND image_id IN ( %1s ) ", implode(', ', array_fill(0, count($MultipleImageIDs), '?'))); } if ($SingleVideoID !== FALSE) { $this->paramtypes .= "i"; $this->values[] = $SingleVideoID; $this->where .= " AND video_id = ?"; } if (is_array($MultipleVideoIDs) && count($MultipleVideoIDs) > 0) { $this->paramtypes .= str_repeat('i', count($MultipleVideoIDs)); $this->values = array_merge($this->values, $MultipleVideoIDs); $this->where .= sprintf(" AND video_id IN ( %1s ) ", implode(', ', array_fill(0, count($MultipleVideoIDs), '?'))); } if ($CacheImageWidth !== FALSE) { $this->paramtypes .= "i"; $this->values[] = $CacheImageWidth; $this->where .= " AND cache_imagewidth = ?"; } if ($CacheImageHeight !== FALSE) { $this->paramtypes .= "i"; $this->values[] = $CacheImageHeight; $this->where .= " AND cache_imageheight = ?"; } if ($IndexSequenceNumber !== FALSE) { $this->paramtypes .= "i"; $this->values[] = $IndexSequenceNumber; $this->where .= " AND index_sequence_number = ?"; } if ($IndexSequenceTotal !== FALSE) { $this->paramtypes .= "i"; $this->values[] = $IndexSequenceTotal; $this->where .= " AND index_sequence_total = ?"; } }
/** * @param int $SingleID * @param array(int) $MultipleIDs * @param string $FirstName * @param string $LastName * @param string $FullName */ public function __construct($SingleID = FALSE, $MultipleIDs = FALSE, $FirstName = FALSE, $LastName = FALSE, $FullName = FALSE) { parent::__construct(); if ($SingleID !== FALSE) { $this->paramtypes .= "i"; $this->values[] = $SingleID; $this->where .= " AND model_id = ?"; } if (is_array($MultipleIDs) && count($MultipleIDs) > 0) { $this->paramtypes .= str_repeat('i', count($MultipleIDs)); $this->values = array_merge($this->values, $MultipleIDs); $this->where .= sprintf(" AND model_id IN ( %1s ) ", implode(', ', array_fill(0, count($MultipleIDs), '?'))); } if ($FirstName !== FALSE) { $this->paramtypes .= 's'; $this->values[] = '%' . $FirstName . '%'; $this->where .= " AND model_firstname LIKE ?"; } if ($LastName !== FALSE) { $this->paramtypes .= 's'; $this->values[] = '%' . $LastName . '%'; $this->where .= " AND model_lastname LIKE ?"; } if ($FullName !== FALSE) { $this->paramtypes .= 's'; $this->values[] = '%' . $FullName . '%'; $this->where .= " AND CONCAT_WS(' ', model_firstname, model_lastname) LIKE ?"; } }
/** * @param int $SingleTagID * @param array(int) $MultipleTagIDs * @param string $TagName * @param int $SingleModelID * @param array(int) $MultipleModelIDs * @param int $SingleSetID * @param array(int) $MultipleSetIDs * @param int $SingleImageID * @param array(int) $MultipleImageIDs * @param int $SingleVideoID * @param array(int) $MultipleVideoIDs * @param bool $ModelIdIsNull * @param bool $SetIdIsNull * @param bool $ImageIdIsNull * @param bool $VideoIdIsNull */ public function __construct($SingleTagID = FALSE, $MultipleTagIDs = FALSE, $TagName = FALSE, $SingleModelID = FALSE, $MultipleModelIDs = FALSE, $SingleSetID = FALSE, $MultipleSetIDs = FALSE, $SingleImageID = FALSE, $MultipleImageIDs = FALSE, $SingleVideoID = FALSE, $MultipleVideoIDs = FALSE, $ModelIdIsNull = FALSE, $SetIdIsNull = FALSE, $ImageIdIsNull = FALSE, $VideoIdIsNull = FALSE) { parent::__construct(); if ($SingleTagID !== FALSE) { $this->paramtypes .= "i"; $this->values[] = $SingleTagID; $this->where .= " AND tag_id = ?"; } if (is_array($MultipleTagIDs) && count($MultipleTagIDs) > 0) { $this->paramtypes .= str_repeat('i', count($MultipleTagIDs)); $this->values = array_merge($this->values, $MultipleTagIDs); $this->where .= sprintf(" AND tag_id IN ( %1s ) ", implode(', ', array_fill(0, count($MultipleTagIDs), '?'))); } if ($TagName !== FALSE) { $this->paramtypes .= 's'; $this->values[] = '%' . $TagName . '%'; $this->where .= " AND tag_name LIKE ?"; } if ($SingleModelID !== FALSE) { $this->paramtypes .= "i"; $this->values[] = $SingleModelID; $this->where .= " AND model_id = ?"; } if (is_array($MultipleModelIDs) && count($MultipleModelIDs) > 0) { $this->paramtypes .= str_repeat('i', count($MultipleModelIDs)); $this->values = array_merge($this->values, $MultipleModelIDs); $this->where .= sprintf(" AND model_id IN ( %1s ) ", implode(', ', array_fill(0, count($MultipleModelIDs), '?'))); } if ($SingleSetID !== FALSE) { $this->paramtypes .= "i"; $this->values[] = $SingleSetID; $this->where .= " AND set_id = ?"; } if (is_array($MultipleSetIDs) && count($MultipleSetIDs) > 0) { $this->paramtypes .= str_repeat('i', count($MultipleSetIDs)); $this->values = array_merge($this->values, $MultipleSetIDs); $this->where .= sprintf(" AND set_id IN ( %1s ) ", implode(', ', array_fill(0, count($MultipleSetIDs), '?'))); } if ($SingleImageID !== FALSE) { $this->paramtypes .= "i"; $this->values[] = $SingleImageID; $this->where .= " AND image_id = ?"; } if (is_array($MultipleImageIDs) && count($MultipleImageIDs) > 0) { $this->paramtypes .= str_repeat('i', count($MultipleImageIDs)); $this->values = array_merge($this->values, $MultipleImageIDs); $this->where .= sprintf(" AND image_id IN ( %1s ) ", implode(', ', array_fill(0, count($MultipleImageIDs), '?'))); } if ($SingleVideoID !== FALSE) { $this->paramtypes .= "i"; $this->values[] = $SingleVideoID; $this->where .= " AND video_id = ?"; } if (is_array($MultipleVideoIDs) && count($MultipleVideoIDs) > 0) { $this->paramtypes .= str_repeat('i', count($MultipleVideoIDs)); $this->values = array_merge($this->values, $MultipleVideoIDs); $this->where .= sprintf(" AND video_id IN ( %1s ) ", implode(', ', array_fill(0, count($MultipleVideoIDs), '?'))); } if ($ModelIdIsNull) { $this->where .= " AND model_id IS NULL"; } if ($SetIdIsNull) { $this->where .= " AND set_id IS NULL"; } if ($ImageIdIsNull) { $this->where .= " AND image_id IS NULL"; } if ($VideoIdIsNull) { $this->where .= " AND video_id IS NULL"; } }
public function __construct($SingleID = FALSE, $MultipleIDs = FALSE, $UserName = FALSE, $Password = FALSE, $Email = FALSE) { parent::__construct(); if ($SingleID !== FALSE) { $this->paramtypes .= "i"; $this->values[] = $SingleID; $this->where .= " AND user_id = ?"; } if (is_array($MultipleIDs) && count($MultipleIDs) > 0) { $this->paramtypes .= str_repeat('i', count($MultipleIDs)); $this->values = array_merge($this->values, $MultipleIDs); $this->where .= sprintf(" AND user_id IN ( %1s ) ", implode(', ', array_fill(0, count($MultipleIDs), '?'))); } if ($UserName !== FALSE) { $this->paramtypes .= 's'; $this->values[] = $UserName; $this->where .= " AND user_username = ?"; } if ($Password !== FALSE) { $this->paramtypes .= 's'; $this->values[] = $Password; $this->where .= " AND user_password = ?"; } if ($Email !== FALSE) { $this->paramtypes .= 's'; $this->values[] = $Email; $this->where .= " AND user_email = ?"; } }