Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2009

    Unanswered: inserting into views

    trying to insert data into view but im getting the run around(no where).

    i would like to do this because its less threads directly to the table.

    could you give me an example please.

    I've followed the guidelines from mysql but im stuck. their are no defaults except ( auto inc) and i've included all rows from the table.

    heres the view code

    1. create or replace algorithm=merge definer=`user`@`localhost` sql security definer view `test`.`Domain` as select
    2. 'test'.'name'.'id' as id,
    3. aes_encrypt(`test`.`name`.`name`,'key') AS `Name`,
    4. `test`.`name`.`date` AS `Date`
    5. from `test`.`domains`;

    thanks in advance for your help

  2. #2
    Join Date
    Jan 2007
    Provided Answers: 12
    If the view consists of more than one table then you will not be able to insert in to it. Instead you must construct a separate insert statement per table that you wish to populate.
    Home | Blog

  3. #3
    Join Date
    Aug 2009


    the view consists of one table. i understand the rules of views.

    its that im using aes_encrypt in the creation of the view, and it doesnt encrypt the data it errors. Ive created a test view with out the aes_encrypt in the view and it inserts fine no prob. what i would like is to use aes_encrypt in the view not the insert statement.

    less overhead on app.

    i've used aes_decrypt fine in the view no prob there.

    thanks in advance for your help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts