protected function buildInsertStatement($data,$table=null) {
		if (!$table) {
			$table = $this->primaryTable;
		}
		$bindparams = array();
		$sql_fields = NULL;
		$sql_values = NULL;
		foreach ($data as $field=>$value) {
			$sql_fields .= "{$field},";
			$sql_values .= ":{$field},";
			$bindparams[":{$field}"] = $value;
		}
		$sql_fields = rtrim($sql_fields,',');
		$sql_values = rtrim($sql_values,',');
		$sql = "INSERT INTO {$table} ({$sql_fields}) VALUES ({$sql_values})";
		if ($this->executeUpdate($sql,$bindparams)) {
			return $this->getLastInsertId();
		}
		return false;
	}