本文整理汇总了PHP中validate::set_fields方法的典型用法代码示例。如果您正苦于以下问题:PHP validate::set_fields方法的具体用法?PHP validate::set_fields怎么用?PHP validate::set_fields使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类validate
的用法示例。
在下文中一共展示了validate::set_fields方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: citizen
$dbh_citizen = new citizen();
$dbh_citizen->set_where("citizen_id='" . quote_smart($citizen_id) . "'");
if ($result = $dbh_citizen->make_query()->result) {
$data = $result->fetch_assoc();
extract($data);
$data = explode('-', $birth_date);
if (count($data) == 3) {
$birth_date_year = $data[0];
$birth_date_month = $data[1];
$birth_date_day = $data[2];
}
$data = explode('-', $date_registered);
if (count($data) == 3) {
$date_registered_year = $data[0];
$date_registered_month = $data[1];
$date_registered_day = $data[2];
}
}
require_once 'subclasses/validate.php';
$dbh_citizen = new validate();
$dbh_citizen->set_fields('proof_of_id, proof_of_address, status');
$dbh_citizen->set_where("citizen_id='" . quote_smart($citizen_id) . "'");
if ($result = $dbh_citizen->make_query()->result) {
$num_validate = $dbh_citizen->num_rows;
for ($a = 0; $a < $num_validate; $a++) {
$data = $result->fetch_row();
$cf_validate_proof_of_id[$a] = $data[0];
$cf_validate_proof_of_address[$a] = $data[1];
$cf_validate_status[$a] = $data[2];
}
}