本文整理匯總了PHP中customer::to_string方法的典型用法代碼示例。如果您正苦於以下問題:PHP customer::to_string方法的具體用法?PHP customer::to_string怎麽用?PHP customer::to_string使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類customer
的用法示例。
在下文中一共展示了customer::to_string方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: array
$responce = array('status' => 'failed', 'error' => 'Data missing', 'data' => array());
}
} else {
if ($form_id == 6) {
///edit customer
if (isset($_POST['customer_id']) and !empty($_POST['customer_id']) and isset($_POST['customer_name']) and !empty($_POST['customer_name']) and isset($_POST['contact_number']) and !empty($_POST['contact_number'])) {
$customer = new customer();
$customer->id = $_POST['customer_id'];
$customer->getCustomer();
$customer->customer_name = $_POST['customer_name'];
$customer->contact_number = $_POST['contact_number'];
if ($customer->updateCustomer()) {
$message = "Customer Updated Successfuly";
$responce = array('status' => 'success', 'error' => '', 'data' => array("message" => $message, "id" => $customer->id));
} else {
$description = "Customer update failed, Customer : " . $customer->to_string();
Log::e($tag, $description);
$mysql_error = mysql_error();
if (empty($mysql_error)) {
$error_message = 'Some server error occured';
} else {
$error_message = $mysql_error;
}
$responce = array('status' => 'failed', 'error' => $error_message, 'data' => array());
}
} else {
$responce = array('status' => 'failed', 'error' => 'Data missing', 'data' => array());
}
} else {
if ($form_id == 8) {
///edit : purchace edit
示例2: customer
}
} else {
if ($form_id == 6) {
if (isset($_POST['customer_name']) and !empty($_POST['customer_name']) and isset($_POST['contact_number']) and !empty($_POST['contact_number'])) {
$customer = new customer();
$customer->customer_name = $_POST['customer_name'];
$customer->contact_number = $_POST['contact_number'];
$user = new user();
$user->id = $_SESSION['user_id'];
$user->getUser();
$customer->company_id = $user->company_id;
if ($customer->addCustomer()) {
$message = "Customer added successfully";
$responce = array('status' => 'success', 'error' => '', 'data' => array("message" => $message));
} else {
Log::e($tag, "Customer adding failed Customer : " . $customer->to_string() . 'Error : ' . mysql_error());
$mysql_error = mysql_error();
if (empty($mysql_error)) {
$error_message = 'Some server error occured';
} else {
$error_message = $mysql_error;
}
$responce = array('status' => 'failed', 'error' => $error_message, 'data' => array());
}
} else {
ob_start();
$a = ob_get_clean();
$responce = array('status' => 'failed', 'error' => 'Data missing' . $a, 'data' => array());
}
} else {
if ($form_id == 7) {
示例3: array
$responce = array('status' => 'failed', 'error' => $error_message, 'data' => array());
}
} else {
$responce = array('status' => 'failed', 'error' => 'Data missing', 'data' => array());
}
} else {
if ($form_id == 21) {
///customer delete
if (isset($_POST['customer_id']) and !empty($_POST['customer_id'])) {
$customer = new customer();
$customer->id = $_POST['customer_id'];
if ($customer->deleteCustomer()) {
$message = "Customer deleted Successfuly";
$responce = array('status' => 'success', 'error' => '', 'data' => array("message" => $message, "id" => $customer->id));
} else {
$description = "Customer delete failed, item : " . $customer->to_string();
Log::e($tag, $description);
$mysql_error = mysql_error();
if (empty($mysql_error)) {
$error_message = 'Some server error occured';
} else {
$error_message = $mysql_error;
}
$responce = array('status' => 'failed', 'error' => $error_message, 'data' => array());
}
} else {
$responce = array('status' => 'failed', 'error' => 'Data missing', 'data' => array());
}
} else {
if ($form_id == 23) {
///bank delete