Skip to content

AomDEV/basic-nine-framework

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 

Repository files navigation

NINE Framework for Beginner (PHP)

Framework for Database Beginner (Easy to Use). This project is beta-test version. You can edit and share your idea.

How to Install

Download all files from github and extract file into your project directory. Like this : c:/xampp/htdocs/myproject/ And see next tutorial.

Settings

Include framework file
require("class.nine.php");
Setting Database Information
$db = new n_database("[user]","[pass]","[host]","[database name]");
Import files
$import = n_render::import_file();

Functions

  1. View all Database function
  2. Function name view_all_db
  3. $result = $db->view_all_db([display as table = false | true]);
  4. If set to "false" It's will return as array
  5. Array ( [0] => Array ( [0] => information_schema ) [1] => Array ( [0] => cdcol ) )
  6. View all Table function
  7. Function name view_all_tbl
  8. $result = $db->view_all_tbl([display as table = false | true]);
  9. If set to "false" It's will return as array
  10. Array ( [0] => Array ( [0] => example ) [1] => Array ( [0] => sql_column ) )
  11. View all Column Function
  12. Function name view_all_clmn
  13. $result = $db->view_all_clmn([display as table = false | true]);
  14. If set to "false" It's will return as array
  15. Array ( [0] => Array ( [0] => test_id ) [1] => Array ( [0] => test_user ) [2] => Array ( [0] => test_pass ) )
  16. View all Data in Table Function
  17. Function name view_all_data
  18. $result = $db->view_all_data([display as table = false | true]);
  19. If set to "false" It's will return as array
  20. Array ( [0] => Array ( [test_id] => 1 [test_user] => test [test_pass] => test ) [1] => Array ( [test_id] => 2 [test_user] => demo [test_pass] => new_value123 ) )
  21. Update SQL Data
  22. Function name sql_single_update_data
  23. $db->sql_single_update_data([table_name],[set_column],[new_value],[where_column],[where_value]);
  24. Return null value
  25. Check Function is disabled or enabled
  26. Function name checkFunction
  27. $check = n_render::checkFunction([function name]);
  28. Return true if function is enabled, Return false if function is disabled
  29. Setup File Request (?page=home , ?page=info etc.)
  30. Function name setup_request
  31. $setup_request = n_render::setup_request($_GET);
  32. Return as file content if it found in "modules/page/[file].php"
  33. You can add file in "modules/page/" folder
  34. [Bonus] iFrame
  35. Function name iframe
  36. $iframe = n_render::iframe([url]);
  37. Return as html tag "<iframe src='[url]'></iframe>"
    etc.

Example

Easy to use database connection syntax example like this.
require("class.nine.php");
$db = new n_database("username","password","host","database_name");
$init = $db->select('member')->find('user_id','=','1')->only(array('username','password'))->init();
//Return as array
$cmd = $db->select('member')->find('user_id','=','1')->only(array('username','password'))->get();
//Return SELECT username,password FROM member WHERE user_id=1;

About

Framework for Database Beginner (Easy to Use)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages