Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2014
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. public static function SelectSpecific($obj, $data_base, $cond)
  2. {
  3. self::$query = "select $obj from " . self::$baseprefix . "$data_base where $cond";
  4. $out = self::Execute();
  5. $array = mysql_fetch_array($out); // THIS LINE IS WARNING LINE
  6. return $array[$obj];
  7. }
  8.  
  9. private static function Execute()
  10. {
  11. $out = mysql_query(self::$query);
  12. return $out;
  13. }
  14.  
  15. public static function SelectSpecific($obj, $data_base, $cond)
  16. {
  17. self::$query = "select $obj from " . self::$baseprefix . "$data_base where $cond";
  18. $out = self::Execute();
  19. if($out){
  20. $array = mysql_fetch_array($out); // THIS LINE IS WARNING LINE
  21. return $array[$obj];
  22. }else {
  23. return false;
  24. }
  25. }
  26.  
  27. if (!$out) {
  28. $message = 'Invalid query: ' . mysql_error() . "n";
  29. $message .= 'Whole query: ' . $query;
  30. die($message);
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement