From bc69b05fc5691c6b148617a0a5829360c3ba584e Mon Sep 17 00:00:00 2001 From: Marco Monteiro Date: Wed, 29 Jan 2020 20:50:50 +0000 Subject: [PATCH] Query results --- README.md | 7 ++++++- ci4_query.sublime-snippet | 8 ++++++++ ci4_query_result.sublime-snippet | 8 ++++++++ ci4_query_result_array.sublime-snippet | 8 ++++++++ ci4_query_row.sublime-snippet | 8 ++++++++ ci4_query_row_array.sublime-snippet | 8 ++++++++ 6 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 ci4_query.sublime-snippet create mode 100644 ci4_query_result.sublime-snippet create mode 100644 ci4_query_result_array.sublime-snippet create mode 100644 ci4_query_row.sublime-snippet create mode 100644 ci4_query_row_array.sublime-snippet diff --git a/README.md b/README.md index 827974a..0028731 100644 --- a/README.md +++ b/README.md @@ -12,4 +12,9 @@ Codeigniter 4 snippets for Sublime Text 3 8. ci_view_section => View section (content within a view that extends a layout) 9. ci_view_include => View include 10. ci_get_locale => Get Locale -11. load_database => Load the Database \ No newline at end of file +11. load_database => Load the Database +12. ci_db_query => Query +13. ci_query_result => Get the query result as object +14. ci_query_result_array => Get the query result as array +15. ci_query_row => Get the query result as row (object) +16. ci_query_row_array => Get the query result as row (array) \ No newline at end of file diff --git a/ci4_query.sublime-snippet b/ci4_query.sublime-snippet new file mode 100644 index 0000000..e1f66fe --- /dev/null +++ b/ci4_query.sublime-snippet @@ -0,0 +1,8 @@ + + query('${1:SELECT name, title, email FROM my_table}'); +]]> + ci_db_query + source.php + CI4 - Query + \ No newline at end of file diff --git a/ci4_query_result.sublime-snippet b/ci4_query_result.sublime-snippet new file mode 100644 index 0000000..98097c6 --- /dev/null +++ b/ci4_query_result.sublime-snippet @@ -0,0 +1,8 @@ + + getResult(); +]]> + ci_query_result + source.php + CI4 - Get the query result (object) + \ No newline at end of file diff --git a/ci4_query_result_array.sublime-snippet b/ci4_query_result_array.sublime-snippet new file mode 100644 index 0000000..767d1de --- /dev/null +++ b/ci4_query_result_array.sublime-snippet @@ -0,0 +1,8 @@ + + getResultArray(); +]]> + ci_query_result_array + source.php + CI4 - Get the query result (Array) + \ No newline at end of file diff --git a/ci4_query_row.sublime-snippet b/ci4_query_row.sublime-snippet new file mode 100644 index 0000000..6b85a82 --- /dev/null +++ b/ci4_query_row.sublime-snippet @@ -0,0 +1,8 @@ + + getRow(); +]]> + ci_query_row + source.php + CI4 - Get the query row (object) + \ No newline at end of file diff --git a/ci4_query_row_array.sublime-snippet b/ci4_query_row_array.sublime-snippet new file mode 100644 index 0000000..24c20d5 --- /dev/null +++ b/ci4_query_row_array.sublime-snippet @@ -0,0 +1,8 @@ + + getRowArray(); +]]> + ci_query_row_array + source.php + CI4 - Get the query row (array) + \ No newline at end of file