project.php 311 B

12345678910111213
  1. <?php
  2. require_once(realpath(dirname(__FILE__)).'/config.php');
  3. require_once(PATH_PHP.'database.php');
  4. global $mysqli;
  5. function projectObj($id){
  6. if($res = query("SELECT * FROM `projects` WHERE id='%d'",Array($id))){
  7. if($res->num_rows == 1){
  8. return $res->fetch_assoc();
  9. }
  10. }
  11. return false;
  12. }
  13. ?>