aboutsummaryrefslogtreecommitdiff
path: root/engine/classes/SelectFieldQueryComponent.php
blob: d490319b3a2b88dc4a53e97b27d37d3185cd6b53 (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}";
	}
}