Examples of model querying

Page displays best with model debug set to true.


QUERY TO BE EXECUTED:

-> select * from Entry where id = 1 and entry_name = 'First Lesson'

PLEASE NOTE: The query shown above is how the query would look before binding. PDO currently has no means of displaying previous query executed.
1
First Lesson
QUERY TO BE EXECUTED:

-> select * from Entry where id = 1 and entry_name = 'First Lesson'

PLEASE NOTE: The query shown above is how the query would look before binding. PDO currently has no means of displaying previous query executed.
1
First Lesson
QUERY TO BE EXECUTED:

-> select * from Entry where entry_name = 'First Lesson'
1
First Lesson
QUERY TO BE EXECUTED:

-> SELECT MAX(id) AS max_id FROM Entry
4
QUERY TO BE EXECUTED:

-> SELECT * FROM Entry where entry_active = 0 order by id

PLEASE NOTE: The query shown above is how the query would look before binding. PDO currently has no means of displaying previous query executed.
3
QUERY TO BE EXECUTED:

-> SELECT * FROM Entry where id > 2 order by id

PLEASE NOTE: The query shown above is how the query would look before binding. PDO currently has no means of displaying previous query executed.
2
QUERY TO BE EXECUTED:

-> SELECT COUNT(id) as total FROM Entry
3
QUERY TO BE EXECUTED:

-> SELECT * FROM Entry where id = 'x'

PLEASE NOTE: The query shown above is how the query would look before binding. PDO currently has no means of displaying previous query executed.
not found
QUERY TO BE EXECUTED:

-> SELECT * FROM Entry where id = 1

PLEASE NOTE: The query shown above is how the query would look before binding. PDO currently has no means of displaying previous query executed.
First Lesson
QUERY TO BE EXECUTED:

-> SELECT * FROM Entry where entry_name != 'First Lesson' order by id

PLEASE NOTE: The query shown above is how the query would look before binding. PDO currently has no means of displaying previous query executed.
3
Third Lesson
4
A new Lesson
QUERY TO BE EXECUTED:

-> SELECT * FROM Entry order by entry_name desc

PLEASE NOTE: The query shown above is how the query would look before binding. PDO currently has no means of displaying previous query executed.
3
Third Lesson
1
First Lesson
4
A new Lesson