mirror of
https://github.com/phpbb/phpbb.git
synced 2025-05-07 16:15:22 +02:00
[ticket/12786] Add get_custom_field_id
Adding function to get CPFs ID PHPBB3-12786
This commit is contained in:
parent
564924e876
commit
b70a1cc4af
@ -111,6 +111,19 @@ abstract class profilefield_base_migration extends \phpbb\db\migration\migration
|
|||||||
$insert_buffer->flush();
|
$insert_buffer->flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get custom profile field id
|
||||||
|
* @return int custom profile filed id
|
||||||
|
*/
|
||||||
|
public function get_custom_profile_field_id()
|
||||||
|
{
|
||||||
|
$sql = 'SELECT field_id FROM ' . PROFILE_FIELDS_TABLE . ' WHERE field_name = \'' . $this->profilefield_name . '\'';
|
||||||
|
$result = $this->db->sql_query($sql);
|
||||||
|
$field_id = (int) $this->db->sql_fetchfield('field_id');
|
||||||
|
|
||||||
|
return $field_id;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param int $start Start of staggering step
|
* @param int $start Start of staggering step
|
||||||
* @return mixed int start of the next step, null if the end was reached
|
* @return mixed int start of the next step, null if the end was reached
|
||||||
|
Loading…
x
Reference in New Issue
Block a user