aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'php/lib/util.php')
-rw-r--r--php/lib/util.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/php/lib/util.php b/php/lib/util.php
index af64fbb..8f8e1e4 100644
--- a/php/lib/util.php
+++ b/php/lib/util.php
@@ -13,7 +13,7 @@ function microtime_float()
{
list($usec, $sec) = explode(" ", microtime());
return ((float)$usec + (float)$sec);
-}
+}
/**
* Add a message to SESSION['messages'] array.
@@ -157,8 +157,8 @@ function emptify_in_array($array, $needle)
*/
function record_exists($table,$column,$val,$extra=NULL)
{
- $result = db_query("SELECT * FROM {$table} WHERE {$column}='{$val}' {$extra}");
- if ($result&&mysql_num_rows($result)>0)
+ $result = DB::query("SELECT * FROM {$table} WHERE {$column}='{$val}' {$extra}");
+ if ($result&&$result->rowCount()>0)
{
return true;
}