public function buildInQueryBindings ($values, $prefix = "in_", &$bound_parameters = array()) {

		$sql 				= "()";

		if (is_array($values) && count($values) > 0) {
			$sql = array();
			$values = array_values($values);

			foreach ($values as $index => $value) {
				$label_name = $prefix . "_" . $index;
				$sql[] = ":" . $label_name;
				$bound_parameters[$label_name] = $value;
			}

			$sql = "(" . implode(", ", $sql) . ")";
		}

		return $sql;
	}
public function buildInQueryBindings ($values, $prefix = "in_", &$bound_parameters = array()) {

		$sql 				= "()";

		if (is_array($values) && count($values) > 0) {
			$sql = array();
			$values = array_values($values);

			foreach ($values as $index => $value) {
				$label_name = $prefix . "_" . $index;
				$sql[] = ":" . $label_name;
				$bound_parameters[$label_name] = $value;
			}

			$sql = "(" . implode(", ", $sql) . ")";
		}

		return $sql;
	}
public function buildInQueryBindings ( $ values , $ prefix = "in_" , & $ bound_parameters = array ( ) ) { $ sql = "()" ; if ( is_array ( $ values ) && count ( $ values ) > 0 ) { $ sql = array ( ) ; $ values = array_values ( $ values ) ; foreach ( $ values as $ index => $ value ) { $ label_name = $ prefix . "_" . $ index ; $ sql [ ] = ":" . $ label_name ; $ bound_parameters [ $ label_name ] = $ value ; } $ sql = "(" . implode ( ", " , $ sql ) . ")" ; } return $ sql ; }
Builds a sub-query for an IN statement with bound values.

@example buildInQueryBindings(array("a", "b", "c"), "ex") => "(:ex_0, :ex_1, :ex_2)", and adds keys for 'ex_0', 'ex_1' and 'ex_2' to the bound parameters

@param array			$values					The values to bind.
@param string		[$prefix]				A prefix to apply to the bound parameter keys.
@param array			[&$bound_parameters]	A reference to the array to inject the bindings on to.

@return string								Contains the SQL query subsection, ex. "(:in_1, :in_2)"
Builds a sub - query for an IN statement with bound values .