The Trongate PHP Framework
Documentation
Help Improve Our Docs
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.
Model Class Reference
Method | Description |
---|---|
count() | Counts the number of rows in a database table. |
count_rows() | Counts the number of rows based on a single condition. |
count_where() | Counts the number of rows based on custom conditions. |
delete() | Deletes a record from the database by its ID. |
describe_table() | Describes the structure of a database table. |
exec() | Executes a SQL statement (development use only). |
get() | Retrieves rows from a database table with optional ordering, limit, and offset. |
get_all_tables() | Retrieves all table names from the database. |
get_max() | Retrieves the maximum 'id' value from the specified table. |
get_many_where() | Fetches multiple records based on a column value. |
get_one_where() | Fetches a single record based on a column value. |
get_where() | Fetches a single record by its ID. |
get_where_custom() | Fetches rows based on custom conditions with optional ordering, limit, and offset. |
get_where_in() | Fetches records where the column's value is within a specified array of values. |
insert() | Inserts a new record into the database and returns the new ID. |
insert_batch() | Inserts multiple records into the specified table in a batch. |
query() | Executes a custom SQL query. |
query_bind() | Executes a custom SQL query with parameter binding. |
resequence_ids() | Resequences the IDs of a specified table. |
table_exists() | Checks if a table exists in the database. |
update() | Updates a record in the database by its ID. |
update_where() | Updates records based on a specific condition. |