| | 73 | |
| | 74 | Microsoft SQL does not have the "LIMIT" clause that SQLite and MySQL have. This is commonly used for showing data in pages with "Next" and "Prev" buttons. The library has a new function AppendLimitClause to automatically append the correct syntax without having to use an if condition. |
| | 75 | |
| | 76 | {{{ |
| | 77 | //char tmp[24]; |
| | 78 | //snprintf(tmp, sizeof(tmp), " LIMIT %d,%d;", ((m_nCurPage - 1) * m_nItemsPerPage), m_nItemsPerPage); |
| | 79 | //strSQL_ += tmp; |
| | 80 | appDB->AppendLimitClause(strSQL_, ((m_nCurPage - 1) * m_nItemsPerPage), m_nItemsPerPage); |
| | 81 | strSQL_ += ";"; |
| | 82 | }}} |