| @@ 870-882 (lines=13) @@ | ||
| 867 | * @param string $where ='true' where clause to use, eg: "WHERE row=12". Defaults to lock whole table. |
|
| 868 | * @param string $col ='1 as adodbignore' |
|
| 869 | */ |
|
| 870 | function row_lock($table, $where='true', $col='1 as adodbignore') |
|
| 871 | { |
|
| 872 | if (!$this->Link_ID && !$this->connect()) |
|
| 873 | { |
|
| 874 | return False; |
|
| 875 | } |
|
| 876 | if (self::$tablealiases && isset(self::$tablealiases[$table])) |
|
| 877 | { |
|
| 878 | $table = self::$tablealiases[$table]; |
|
| 879 | } |
|
| 880 | ||
| 881 | return $this->Link_ID->RowLock($table, $where, $col); |
|
| 882 | } |
|
| 883 | ||
| 884 | /** |
|
| 885 | * Commit changed rows in table |
|
| @@ 890-902 (lines=13) @@ | ||
| 887 | * @param string $table |
|
| 888 | * @return boolean |
|
| 889 | */ |
|
| 890 | function commit_lock($table) |
|
| 891 | { |
|
| 892 | if (!$this->Link_ID && !$this->connect()) |
|
| 893 | { |
|
| 894 | return False; |
|
| 895 | } |
|
| 896 | if (self::$tablealiases && isset(self::$tablealiases[$table])) |
|
| 897 | { |
|
| 898 | $table = self::$tablealiases[$table]; |
|
| 899 | } |
|
| 900 | ||
| 901 | return $this->Link_ID->CommitLock($table); |
|
| 902 | } |
|
| 903 | ||
| 904 | /** |
|
| 905 | * Unlock rows in table |
|
| @@ 910-922 (lines=13) @@ | ||
| 907 | * @param string $table |
|
| 908 | * @return boolean |
|
| 909 | */ |
|
| 910 | function rollback_lock($table) |
|
| 911 | { |
|
| 912 | if (!$this->Link_ID && !$this->connect()) |
|
| 913 | { |
|
| 914 | return False; |
|
| 915 | } |
|
| 916 | if (self::$tablealiases && isset(self::$tablealiases[$table])) |
|
| 917 | { |
|
| 918 | $table = self::$tablealiases[$table]; |
|
| 919 | } |
|
| 920 | ||
| 921 | return $this->Link_ID->RollbackLock($table); |
|
| 922 | } |
|
| 923 | ||
| 924 | /** |
|
| 925 | * Find the primary key of the last insertion on the current db connection |
|