Guest User

Untitled

a guest
Oct 19th, 2017
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. class SQLStatement {
  2. private $statement = "";
  3. public function __construct($statement) {
  4. $this->statement = $statement;
  5. }
  6. public function getStatement() {
  7. return $this->statement;
  8. }
  9. }
  10.  
  11. class DBUtilities {
  12. static public function einfuegen($wert) {
  13. return new SQLStatement("INSERT INTO ... VALUES ($wert)");
  14. }
  15. }
  16.  
  17. $db->query(DBUtilities::einfuegen("Hallo Welt")->getStatement());
Add Comment
Please, Sign In to add comment