本文整理汇总了PHP中db_clean函数的典型用法代码示例。如果您正苦于以下问题:PHP db_clean函数的具体用法?PHP db_clean怎么用?PHP db_clean使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了db_clean函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: db_get_course_name
function db_get_course_name($id)
{
$id = db_clean($id);
$sql = "SELECT namn FROM kurs WHERE id='{$id}' LIMIT 1";
$r = mysql_fetch_array(mysql_query($sql));
return $r['namn'];
}
示例2: _fields
function _fields()
{
$data = array (
'langname' => strtolower(db_clean($_POST['langname'])),
'status' => db_clean($_POST['status']),
);
return $data;
}
示例3: _fields
function _fields()
{
$data = array(
'email' => db_clean($_POST['mail']),
'password' => $this->userlib->encode_password($_POST['password0'])
);
return $data;
}
示例4: updateEmployee
function updateEmployee()
{
$birthday = isset($_POST['birthday']) ? $_POST['birthday'] : '0-0-0';
$array_birth = explode('-', $birthday);
$enterday = isset($_POST['enterday']) ? $_POST['enterday'] : '0-0-0';
$array_enter = explode('-', $enterday);
$data = array('name' => db_clean($_POST['name']), 'dept_id' => id_clean($_POST['dept_id']), 'position' => db_clean($_POST['position']), 'mobile' => db_clean($_POST['mobile']), 'telephone' => db_clean($_POST['telephone']), 'address' => db_clean($_POST['address']), 'zipcode' => db_clean($_POST['zipcode']), 'birth_year' => id_clean($array_birth[0]), 'birth_month' => id_clean($array_birth[1]), 'birth_day' => id_clean($array_birth[2]), 'enter_year' => id_clean($array_enter[0]), 'enter_month' => id_clean($array_enter[1]), 'enter_day' => id_clean($array_enter[2]), 'idcard' => db_clean($_POST['idcard']), 'graduateschool' => db_clean($_POST['graduateschool']), 'education' => db_clean($_POST['education']));
$this->db->where('id', $_POST['id']);
$this->db->update('yz_employees', $data);
}
示例5: _fields
function _fields()
{
$temp = str_replace("@$%#@", 'style="color: ',$_POST['backup']);
$temp = str_replace("&$%#@", 'style="background-color: ',$temp);
$data = array(
'title' => db_clean($_POST['title']),
'content' => $temp
);
return $data;
}
示例6: updateSubscriber
function updateSubscriber()
{
$data = array(
'name' => db_clean($_POST['name']),
'email' => db_clean($_POST['email'])
);
$this->db->where('id', id_clean($_POST['id']));
$this->db->update('omc_subscribers', $data);
}
示例7: _feild
function _feild()
{
$data = array(
'name' => db_clean($_POST['name']),
'shortdesc' => db_clean($_POST['shortdesc']),
'longdesc' => db_clean($_POST['longdesc'],5000),
'status' => db_clean($_POST['status'],8),
'image' => $this->input->post('image'),
);
return $data;
}
示例8: updateDepartment
function updateDepartment($id, $name)
{
$data = array('name' => db_clean($name));
$this->db->where('id', $id);
$this->db->update('yz_departments', $data);
if ($this->db->affected_rows() > 0) {
return true;
} else {
return false;
}
}
示例9: _fields
function _fields()
{
$data = array(
'yahoo_nick1' => db_clean($_POST['online1']),
'yahoo_nick2' => db_clean($_POST['online2']),
'name' => db_clean($_POST['name']),
'phone' => db_clean($_POST['phone'])
);
return $data;
}
示例10: updateUser
function updateUser()
{
$data = array(
'username' => db_clean($_POST['username'], 16),
'e-mail' => db_clean($_POST['email'], 255),
'status' => db_clean($_POST['status'], 8),
'password' => db_clean(hash('md5', $_POST['password']), 16)
);
$this->db->where('id', id_clean($_POST['id']));
$this->db->update('admins', $data);
}
示例11: _fields_settings
function _fields_settings()
{
$data = array(
'site_name' => db_clean($_POST['SITE_NAME']),
'site_url' => db_clean($_POST['SITE_URL']),
'site_secure' => db_clean($_POST['SITE_URL_SECURE']),
'friendly_url' => db_clean($_POST['FRIENDLY_URL']),
'temporary' => db_clean($_POST['temporary_close'])
);
return $data;
}
示例12: _fields
function _fields()
{
$data = array(
'name' => db_clean($_POST['name']),
'metadesc' => db_clean($_POST['metadesc']),
'metakeyword' => db_clean($_POST['metakeyword']),
'shortdesc' => db_clean($_POST['shortdesc']),
'longdesc' => $this->input->post('longdesc'),
'is_display_in_menu' => $_POST['is_display_in_menu'],
'parentid' => $_POST['parent_id']
);
return $data;
}
示例13: _feild
function _feild()
{
$data = array(
'name' => db_clean($_POST['name']),
'shortdesc' => db_clean($_POST['shortdesc']),
'longdesc' => db_clean($_POST['longdesc'],5000),
'status' => db_clean($_POST['status'],8),
'slide_order' => db_clean($_POST['slide_order']),
'thumbnail' => db_clean($_POST['thumbnail']),
'image' => db_clean($_POST['image']),
);
return $data;
}
示例14: _feild
function _feild()
{
$data = array(
'name' => db_clean($_POST['name']),
'shortdesc' => db_clean($_POST['shortdesc']),
'longdesc' => db_clean($_POST['longdesc'],5000),
'status' => db_clean($_POST['status'],8),
'slide_order' => db_clean($_POST['slide_order']),
'thumbnail' => db_clean($_POST['thumbnail']),
'image' => db_clean($_POST['image']),
'readmorelink' => $this->input->post('readmorelink'),
);
return $data;
}
示例15: _fields
function _fields()
{
$data = array(
'customer_first_name' => db_clean($_POST['customer_first_name'],25),
'customer_last_name' => db_clean($_POST['customer_last_name'],25),
'phone_number' => db_clean($_POST['phone_number'],15),
'email' => db_clean($_POST['email'],50),
'address' => db_clean($_POST['address'],50),
'city' => db_clean($_POST['city'],25),
'post_code' => db_clean($_POST['post_code'],10),
'password' => db_clean(do_hash($_POST['password']),16)
);
return $data;
}