aboutsummaryrefslogtreecommitdiff
path: root/engine/classes/SelectFieldQueryComponent.php
blob: fbc4a81c1eb4d571d88ac0bcd4de677d5a9da7e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?php
/**
 * @class SelectFieldQueryComponent Class representing a select field.
 * This class represents a select field component.
 * @author Curverider Ltd
 * @see Query
 */
class SelectFieldQueryComponent extends QueryComponent
{
	/**
	 * Construct a select field component
	 *
	 * @param string $table The table containing the field.
	 * @param string $field The field or "*"
	 */
	function __construct($table, $field)
	{
		global $CONFIG;

		$this->table = $CONFIG->dbprefix . sanitise_string($table);
		$this->field = sanitise_string($field);
	}

	function __toString()
	{
		return "{$this->table}.{$this->field}";
	}
}