PageRenderTime 72ms CodeModel.GetById 22ms RepoModel.GetById 1ms app.codeStats 0ms

/config/m_base.php

https://bitbucket.org/metamorph/kppnadministration
PHP | 48 lines | 14 code | 6 blank | 28 comment | 0 complexity | 2ce40c06a630bd652c31d9fb1a9623b7 MD5 | raw file
Possible License(s): GPL-2.0
  1. <?php
  2. /*
  3. * m_base.php
  4. *
  5. * Copyright 2012 metamorph <metamorph@Cyber-Station>
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 2 of the License, or
  10. * (at your option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  20. * MA 02110-1301, USA.
  21. *
  22. *
  23. */
  24. class M_base
  25. {
  26. /**
  27. * Constructor of class M_base.
  28. *
  29. * @return void
  30. */
  31. public function __construct()
  32. {
  33. parent::__construct();
  34. }
  35. // function for checking data existence
  36. public function dataCheck($field_name,$table_name)
  37. {
  38. $queryCek = mysql_query("SELECT $field_name FROM $table_name LIMIT 1");
  39. $resultCek = mysql_num_rows($queryCek);
  40. return $resultCek;
  41. }
  42. }