Restrict selecting from a table

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • hristov.milen@gmail.com

    Restrict selecting from a table

    Hi,
    Is there a way to restrict selecting from a table..

    I have problem with one check,

    I have select and after this insert based on the select. If it happen
    in one time .. I can insert incorrect information. If I do lock table
    SOMETABLE read; it still select and return results normaly. I'm open
    for suggestions :)

    P.S. Excuse my bad english :)

  • Gordon Burditt

    #2
    Re: Restrict selecting from a table

    >Is there a way to restrict selecting from a table..[color=blue]
    >
    >I have problem with one check,[/color]

    Please state the problem.
    [color=blue]
    >I have select and after this insert based on the select. If it happen
    >in one time ..[/color]

    You mean there's a problem if something changes between the select
    and the insert?
    [color=blue]
    >I can insert incorrect information. If I do lock table
    >SOMETABLE read; it still select and return results normaly. I'm open
    >for suggestions :)[/color]

    If using LOCK TABLE works, why not use it? That's what it's for.
    It would appear, though, that you need lock table sometable write,
    though, since you're inserting.

    Gordon L. Burditt

    Comment

    Working...