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

    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`;
    6.

    thanks in advance for your help

  2. #2
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    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.
    George
    Home | Blog

  3. #3
    Join Date
    Aug 2009
    Posts
    2

    re:

    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
  •