parent: set empty data to null

This commit is contained in:
Ricsi
2016-12-31 21:53:25 +01:00
parent 5a78b09a38
commit 5e6e1129e5

View File

@@ -109,6 +109,10 @@ class user_parent {
global $sql;
//beilleszti AB-ba
//visszaadja az ID-t
if ($_email == '') $_email = 'null';
if ($_facebook == '') $_facebook = 'null';
if ($_phone == '') $_phone = 'null';
return $sql->insert_into('user_parent',
array(
@@ -122,6 +126,9 @@ class user_parent {
public static function update_parent($_parent_value_array, $_up_id) {
global $sql;
foreach ($_parent_value_array as $index => $value) {
if ($value == '') $_parent_value_array[$index] = 'null';
}
$sql->update_table('user_parent', $_parent_value_array, array('up_id' => $_up_id));
}
}