src/Sqlsrv/SqlsrvDriver.php
protected function checkFieldExists($table, $field)
	{
		$this->connect();

		$table = $this->replacePrefix((string) $table);
		$this->setQuery(
			"SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = '$table' AND COLUMN_NAME = '$field' ORDER BY ORDINAL_POSITION"
		);

		if ($this->loadResult())
		{
			return true;
		}

		return false;
	}
protected function checkFieldExists($table, $field)
	{
		$this->connect();

		$table = $this->replacePrefix((string) $table);
		$this->setQuery(
			"SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = '$table' AND COLUMN_NAME = '$field' ORDER BY ORDINAL_POSITION"
		);

		if ($this->loadResult())
		{
			return true;
		}

		return false;
	}
protected function checkFieldExists ( $ table , $ field ) { $ this -> connect ( ) ; $ table = $ this -> replacePrefix ( ( string ) $ table ) ; $ this -> setQuery ( "SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = '$table' AND COLUMN_NAME = '$field' ORDER BY ORDINAL_POSITION" ) ; if ( $ this -> loadResult ( ) ) { return true ; } return false ; }
Method to check and see if a field exists in a table.

@param   string  $table  The table in which to verify the field.
@param   string  $field  The field to verify.

@return  boolean  True if the field exists in the table.

@since   1.0
Method to check and see if a field exists in a table .