aboutsummaryrefslogtreecommitdiff
path: root/engine/classes/SelectFieldQueryComponent.php
blob: 322ddcb80837d2cc39e546e31c384d51570a6d21 (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
<?php
/**
 * @class SelectFieldQueryComponent Class representing a select field.
 * This class represents a select field component.
 * @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}";
	}
}