Browse Source

check_table_field return all fields

master
Robin Thoni 9 years ago
parent
commit
9b553ad844
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      utils.php

+ 2
- 2
utils.php View File

@@ -54,11 +54,11 @@ function check_table_field($header, $table, $field)
54 54
   $headers = apache_request_headers();
55 55
   if (!isset($headers[$header]))
56 56
     return false;
57
-  $u = database_exec("SELECT id FROM $table WHERE `$field` = :data",
57
+  $u = database_exec("SELECT * FROM $table WHERE `$field` = :data",
58 58
     array(":data" => $headers[$header]))->fetch();
59 59
   if (!$u)
60 60
     return false;
61
-  return $headers[$header];
61
+  return $u;
62 62
 }
63 63
 
64 64
 ?>

Loading…
Cancel
Save