database_example.php 833 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. use ORM\Connections as Connections;
  3. /*
  4. * PostgreSQL
  5. *
  6. * Connections::addConnection(Connection::open([
  7. 'driver' => 'pgsql',
  8. 'host' => 'localhost',
  9. 'prefix' => '_urfat',
  10. 'name' => 'urfat',
  11. 'user' => 'urfat',
  12. 'pass' => 'urfat'])
  13. , "default");
  14. */
  15. /*
  16. * Mysql
  17. *
  18. * Connections::addConnection(Connection::open([
  19. 'driver' => 'mysql',
  20. 'host' => 'localhost',
  21. 'prefix' => '_urfat',
  22. 'name' => 'urfat',
  23. 'user' => 'urfat',
  24. 'pass' => 'urfat'])
  25. , "default");
  26. */
  27. /*
  28. * Sqlite
  29. *
  30. Connections::addConnection(Connection::open([
  31. 'driver' => 'sqlite',
  32. 'prefix' => '_urfat',
  33. 'name' => 'database.db'])
  34. , "default");
  35. */