DBException
Database error: 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 '?' at line 1
3
File: [STICTH]1.0/libraries/dbmodel/DBModel.php
1772: if ( $this->_whereAppend ) {
1773: $this->_where .= ' AND '.@implode(' AND ', $this->_whereAppend).' ';
1774: }
1775: $cq .= $this->_where;
1776: $cq .= $this->_group;
1777: $cq .= $this->_having;
1778: foreach ( $this->_params as $p ) {
1779: $cq = preg_replace('/\?/', $p, $cq, 1);
1780: }
1781: if ($cr = $this->conn->query($cq)) {
1782: $vals = $cr->fetch_assoc();
1783: $this->_total_count = $vals['c'];
1784: $this->_current_page = $page;
1785: } else {
1786: echo mysql_error();
1787: }
1788:
1789: // perform the real query with the limit
1790: $q = '';
1791: $q .= $this->_select;
51: ->where('code = ?')
52: ->params($code)
53: ->search(1);
54: $v['new_category'] = $new_category->next();
55: $news = new Tnew();
56: $news
57: ->where('new_category_id = ?')
58: ->params($v['new_category']->id)
59: ->desc("date")
60: ->paginate($page, PAGE_LENGTH, 1);
61: foreach($news as $n){
62: $v['news'][] = $n->fields;
63: }
64: $v['total_count'] = $news->_total_count;
65: $v['page_count'] = ceil(($v['total_count'])/PAGE_LENGTH);
66: $v['current_page'] = $news->_current_page;
67: $v['page'] = $page;
68: $v['code'] = $code;
69:
70: title('M.M.E.');
18:
19: if ($controller->access_rights[$current_action]) {
20: AccessControl::require_right($controller->access_rights[$current_action]);
21: }
22:
23: if ( !method_exists($controller, $current_action) ) {
24: throw new URIResolutionException('<b>'.$current_controller.'->'.$current_action.'()</b> not found.');
25: } else {
26: try {
27: eval("\$controller->".$current_action."('".@implode('\',\'', $additional_vars)."');");
28: } catch ( DBException $ex ) {
29: serve_error_server_error($ex);
30: } catch ( GenericException $ex ) {
31: serve_error_server_error($ex);
32: } catch ( ModelException $ex ) {
33: serve_error_server_error($ex);
34: } catch ( Exception $ex ) {
35: serve_error_server_error($ex);
36: }
37: }
0: <?php
1: require_once 'setup.php';
2: require_once 'run.php';
3: ?>
15: else { $GLOBALS['config']['env'] = ENV_DEVEL; }
16:
17: if ( $_ENV['STITCH_PATH'] ) define('STITCH_PATH', $_ENV['STITCH_PATH']);
18:
19: require_once('../config/options.php');
20: require_once('../config/stitch.php');
21:
22: try {
23: require_once(STITCH_PATH.STITCH_VERSION.'/libraries/session/session.php');
24: require_once(STITCH_PATH.STITCH_VERSION.'/libraries/load_stitch.php');
25: } catch ( URIResolutionException $ex ) {
26: // This type of exception will be normally caught here
27: serve_error_page_not_found($ex);
28: } catch ( Exception $ex ) {
29: // No other exception should be caught here, so if there is one, its a fatal error and should display 500.html
30: serve_error_server_error($ex);
31: }
32: ?>
This error is brought to you by Stitch-1.0
Shell to DOS...Come in DOS, do you copy? Shell to DOS...