fix unused code

This commit is contained in:
Clint Armstrong
2015-08-25 11:35:27 -04:00
parent 2caba3ee58
commit a71172969f
2 changed files with 31 additions and 12 deletions
+16 -6
View File
@@ -59,10 +59,20 @@ function dbQuery($sql, $parameters=array()) {
}//end dbQuery()
/*
* Aquire a lock on a string
* */
function dbGetLock($data, $timeout = 0) {
$sql = 'SELECT GET_LOCK(\'' . $data . '\',' . $timeout . ')';
$result = dbFetchCell($sql);
return $result;
}
/*
* Check a lock on a string
* */
function dbCheckLock($data, $timeout = 0) {
function dbCheckLock($data) {
$sql = 'SELECT IS_FREE_LOCK(\'' . $data . '\')';
$result = dbFetchCell($sql);
return $result;
@@ -72,12 +82,12 @@ function dbCheckLock($data, $timeout = 0) {
/*
* Release a lock on a string
* */
function dbReleaseLock($data, $timeout = 0) {
$sql = 'SELECT RELEASE_LOCK(\'' . $data . '\')';
$result = dbFetchCell($sql);
return $result;
function dbReleaseLock($data) {
$sql = 'SELECT RELEASE_LOCK(\'' . $data . '\')';
$result = dbFetchCell($sql);
return $result;
}
/*
* Passed an array and a table name, it attempts to insert the data into the table.
+15 -6
View File
@@ -59,10 +59,20 @@ function dbQuery($sql, $parameters=array()) {
}//end dbQuery()
/*
* Aquire a lock on a string
* */
function dbGetLock($data, $timeout = 0) {
$sql = 'SELECT GET_LOCK(\'' . $data . '\',' . $timeout . ')';
$result = dbFetchCell($sql);
return $result;
}
/*
* Check a lock on a string
* */
function dbCheckLock($data, $timeout = 0) {
function dbCheckLock($data) {
$sql = 'SELECT IS_FREE_LOCK(\'' . $data . '\')';
$result = dbFetchCell($sql);
return $result;
@@ -72,13 +82,12 @@ function dbCheckLock($data, $timeout = 0) {
/*
* Release a lock on a string
* */
function dbReleaseLock($data, $timeout = 0) {
$sql = 'SELECT RELEASE_LOCK(\'' . $data . '\')';
$result = dbFetchCell($sql);
return $result;
function dbReleaseLock($data) {
$sql = 'SELECT RELEASE_LOCK(\'' . $data . '\')';
$result = dbFetchCell($sql);
return $result;
}
/*
* Passed an array and a table name, it attempts to insert the data into the table.
* Check for boolean false to determine whether insert failed