A PHP Error was encountered

Severity: Warning

Message: Missing argument 2 for Gallery::index()

Filename: controllers/Gallery.php

Line Number: 21

Backtrace:

File: /home/k6355308/public_html/application/controllers/Gallery.php
Line: 21
Function: _error_handler

File: /home/k6355308/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Notice

Message: Undefined variable: page_num

Filename: controllers/Gallery.php

Line Number: 59

Backtrace:

File: /home/k6355308/public_html/application/controllers/Gallery.php
Line: 59
Function: _error_handler

File: /home/k6355308/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at /home/k6355308/public_html/system/core/Exceptions.php:272)

Filename: core/Common.php

Line Number: 568

Backtrace:

File: /home/k6355308/public_html/application/models/Gallery_model.php
Line: 36
Function: query

File: /home/k6355308/public_html/application/controllers/Gallery.php
Line: 59
Function: get_by_cat_id_limit

File: /home/k6355308/public_html/index.php
Line: 315
Function: require_once

Database Error

A Database Error Occurred

Error Number: 1064

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-3,3' at line 1

SELECT * FROM gallery WHERE categoryid ="" ORDER BY ordernumber ASC, id DESC limit -3,3

Filename: models/Gallery_model.php

Line Number: 36