Skip to content

Commit

Permalink
Query results
Browse files Browse the repository at this point in the history
  • Loading branch information
mpmont committed Jan 29, 2020
1 parent f48eaed commit bc69b05
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 1 deletion.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
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)
8 changes: 8 additions & 0 deletions ci4_query.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<snippet>
<content><![CDATA[
\$query = \$db->query('${1:SELECT name, title, email FROM my_table}');
]]></content>
<tabTrigger>ci_db_query</tabTrigger>
<scope>source.php</scope>
<description>CI4 - Query</description>
</snippet>
8 changes: 8 additions & 0 deletions ci4_query_result.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<snippet>
<content><![CDATA[
\$results = \$query->getResult();
]]></content>
<tabTrigger>ci_query_result</tabTrigger>
<scope>source.php</scope>
<description>CI4 - Get the query result (object)</description>
</snippet>
8 changes: 8 additions & 0 deletions ci4_query_result_array.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<snippet>
<content><![CDATA[
\$results = \$query->getResultArray();
]]></content>
<tabTrigger>ci_query_result_array</tabTrigger>
<scope>source.php</scope>
<description>CI4 - Get the query result (Array)</description>
</snippet>
8 changes: 8 additions & 0 deletions ci4_query_row.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<snippet>
<content><![CDATA[
\$row = \$query->getRow();
]]></content>
<tabTrigger>ci_query_row</tabTrigger>
<scope>source.php</scope>
<description>CI4 - Get the query row (object)</description>
</snippet>
8 changes: 8 additions & 0 deletions ci4_query_row_array.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<snippet>
<content><![CDATA[
\$row = \$query->getRowArray();
]]></content>
<tabTrigger>ci_query_row_array</tabTrigger>
<scope>source.php</scope>
<description>CI4 - Get the query row (array)</description>
</snippet>

0 comments on commit bc69b05

Please sign in to comment.