SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: lock a table

  1. #1
    SitePoint Evangelist
    Join Date
    Jan 2005
    Location
    bahrain
    Posts
    553
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thumbs up lock a table

    hi
    i asked also that in mysql i know thier are funtions to lock and unlock a table. i want o know that how can i implement in php for which functions liek to run the mysql query thier is mysql_query($query); like this.

    lock database

    seelct query

    update query

    unlock database
    its urgent plzzz.....
    regards
    phphelp

  2. #2
    SitePoint Addict
    Join Date
    Oct 2004
    Location
    Southwest US
    Posts
    203
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You simply need to create the lock syntax and send it through mysql_query(), do your selecting/updating, and then send:

    mysql_query('UNLOCK TABLES');

    The locking table syntax is pretty straight forward, but there are some wrinkles. Read this over: MySQL lock syntax, and if you have issues, let us know.

    Hope this helps,
    Itshim


Bookmarks

Posting Permissions

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