Introduction
Basic Concepts
Understanding Routing
Controllers
Views
Assets
Modules Calling Modules
Parent & Child Modules
Database Operations
Modules within Modules
Templates & Themes
Helpers Explained
Form Handling
Working with Files
The Module Import Wizard
Authorization & Authentication
The API Explorer
If you’ve found an error, spotted something missing, or feel a section could be clearer or better explained, we’d love to hear from you. Your feedback helps keep the documentation accurate and useful for everyone.
Please report issues or suggest improvements on GitHub. Community input is invaluable in making the docs stronger.
Not comfortable with GitHub? No problem — you can also get in touch with us directly via our contact form. We welcome all feedback.
Fetching Data
The Trongate Model class provides several methods for fetching data from your database tables. These methods are designed to retrieve records efficiently based on various criteria.
- get(): Retrieves all records from a table.
- get_where(): Retrieves records based on a specific condition.
- get_where_custom(): Retrieves records based on custom SQL conditions.
- get_one_where(): Retrieves a single record based on a specific condition.
- get_many_where(): Retrieves multiple records based on specific conditions.
- get_where_in(): Retrieves records where a column value is in a specified array.
- get_max(): Retrieves the maximum value of a column.
Video Tutorial: Basic Data Fetching
The following video demonstrates how to fetch data using Trongate's in-built data fetching methods.