Revision 9333
Added by Aaron Marcuse-Kubitza over 11 years ago
lib/sh/db.sh | ||
---|---|---|
19 | 19 |
alias mk_table_esc='declare table_esc; mk_esc_name table' |
20 | 20 |
|
21 | 21 |
alias mk_select='mk_table_esc |
22 |
declare query="${query:-SELECT * FROM $table_esc}${limit:+ LIMIT $limit}"' |
|
22 |
declare query="$(rtrim "${query:-SELECT * FROM $table_esc${filter:+ |
|
23 |
WHERE $filter |
|
24 |
}}${limit:+ |
|
25 |
LIMIT $limit}")" |
|
26 |
' |
|
23 | 27 |
|
24 | 28 |
fi # load new aliases |
25 | 29 |
if self_being_included; then |
Also available in: Unified diff
lib/sh/db.sh: mk_select: constructed queries: support WHERE clause using $filter