jeudi 29 décembre 2016

How to execute update and delete query on sql view?

I have created a view which is showing the data from multiple tables . now I want to perform Data manipulation operations on view . How can I achieve this ?

This is my view

CREATE 
    ALGORITHM = UNDEFINED 
    DEFINER = `forge`@`%` 
    SQL SECURITY DEFINER
VIEW `contact_view` AS
    SELECT 
        `c`.`id` AS `id`,
        `c`.`fname` AS `fname`,
        `c`.`mname` AS `mname`,
        `c`.`lname` AS `lname`,
        CONCAT(`c`.`fname`, ' ', `c`.`lname`) AS `fullname`,
        `c`.`gender` AS `gender`,
        `c`.`dob` AS `dob`,
        `c`.`points` AS `points`,
        `c`.`stars` AS `star`,
        `c`.`inst_id` AS `inst_id`,
        `c`.`ingr_id` AS `ingr_id`,
        `c`.`fami_id` AS `fami_id`,
        `c`.`sour_id` AS `sour_id`,
        `c`.`image` AS `img`,
        `c`.`address` AS `address`,
        `c`.`email` AS `email`,
        `c`.`doc` AS `doc`,
        `cl`.`value` AS `mobile`,
        `p`.`district` AS `district`,
        `p`.`pincode` AS `pincode`
    FROM
        (((`contact` `c`
        JOIN `communication_link` `cl`)
        JOIN `contact_communication` `cc`)
        JOIN `pincode_db` `p`)
    WHERE
        ((`cl`.`cont_id` = `c`.`id`)
            AND (`cl`.`coco_id` = 1)
            AND (`c`.`pinc_id` = `p`.`id`))



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2hvwnqv
via IFTTT

Aucun commentaire:

Enregistrer un commentaire