[ create a new paste ] login | about

Link: http://codepad.org/lBDYNzjY    [ raw code | output | fork ]

aceballos - PHP, pasted on Apr 20:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php

# ------------------ [ sup_db (fragment)


  class DbConnection { 
      private $str_TABLEPREFIX = 'siteup_';
      public function dbPrefix()
        { return $this->str_TABLEPREFIX; }
      }
      
      
# ------------------ [ code

   $db = new DbConnection();

   $str_query = "SELECT * FROM ".$db->dbPrefix()."default ORDER BY name ";
   print $str_query;

?>


Output:
1
SELECT * FROM siteup_default ORDER BY name 


Create a new paste based on this one


Comments: