本文整理匯總了PHP中funciones::borrar方法的典型用法代碼示例。如果您正苦於以下問題:PHP funciones::borrar方法的具體用法?PHP funciones::borrar怎麽用?PHP funciones::borrar使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類funciones
的用法示例。
在下文中一共展示了funciones::borrar方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: funciones
function del_item($id)
{
$fun = new funciones();
$tbl = 'books';
$field = 'tb_id';
$var = $id;
return $fun->borrar($tbl, $field, $var);
}
示例2: remove_user
function remove_user()
{
$fun = new funciones();
$msg = new messages();
$response = new StdClass();
/*recibimos variables*/
$user = $_POST["user"];
$res = $fun->borrar("vehiculos", "ve_id", $user);
if ($res) {
$res = true;
$mes = $msg->get_msg("e004");
} else {
$res = false;
$mes = $msg->get_msg("e022");
}
$response->res = $res;
$response->mes = $mes;
echo json_encode($response);
}
示例3: change_pack
function change_pack()
{
$fun = new funciones();
$msg = new messages();
$response = new StdClass();
/*recibimos variables*/
$act = $_POST["a"];
$id = $_POST["id"];
if ($act == "" || $id == "") {
$res = false;
$mes = $msg->get_msg("e005");
} else {
$con = new con();
$con->connect();
if ($act == 1) {
//activar, cambiar a 99
if ($fun->borrar("remisiones_fisicas", "rf_id", $id)) {
$res = true;
$mes = $msg->get_msg("e004");
} else {
$res = false;
$mes = $msg->get_msg("e003-1", "Activando remision.");
}
} else {
//desactivar, cambiar a 1
if ($fun->activar("remisiones_fisicas", "rf_id", $id)) {
$res = true;
$mes = $msg->get_msg("e004");
} else {
$res = false;
$mes = $msg->get_msg("e003-1", "Desactivando remision.");
}
}
}
$response->res = $res;
$response->mes = $mes;
echo json_encode($response);
$con->disconnect();
}
示例4: remove_inv
function remove_inv()
{
$fun = new funciones();
$msg = new messages();
$response = new StdClass();
/*recibimos variables*/
$inv = $_POST["inv"];
$res = $fun->borrar("inventario", "in_id", $inv);
if ($res) {
$res = true;
$mes = $msg->get_msg("e004");
} else {
$res = false;
$mes = $msg->get_msg("e019");
}
$response->res = $res;
$response->mes = $mes;
echo json_encode($response);
}
示例5: remove_finca
function remove_finca()
{
$fun = new funciones();
$msg = new messages();
$response = new StdClass();
/*recibimos variables*/
$finca = $_POST["finca"];
if ($fun->borrar("fincas", "fi_id", $finca)) {
if ($fun->borrar("inventario", "in_fi_id", $finca)) {
if ($fun->borrar("control_inventarios", "ci_fi_id", $finca)) {
if ($fun->borrar("lotes_autorizados", "la_fi_id", $finca)) {
$res = true;
$mes = $msg->get_msg("e004");
} else {
$res = false;
$mes = $msg->get_msg("e016");
}
} else {
$res = false;
$mes = $msg->get_msg("e017");
}
} else {
$res = false;
$mes = $msg->get_msg("e018");
}
} else {
$res = false;
$mes = $msg->get_msg("e015");
}
$response->res = $res;
$response->mes = $mes;
echo json_encode($response);
}