Jump to content

wwt

Expert
  • Posts

    2,571
  • Joined

  • Last visited

  • Days Won

    119

wwt last won the day on September 27 2022

wwt had the most liked content!

About wwt

  • Birthday 04/15/1981

Information

  • Sex
    Мужчина
  • From
    Санкт-Петербург

Recent Profile Visitors

19,845 profile views

wwt's Achievements

Explorer

Explorer (1/14)

  • Very Popular Rare

Recent Badges

630

Reputation

76

Community Answers

Single Status Update

See all updates by wwt

  1. routecat_form

    <input type="text" name="keyword" value="<?php echo $keyword; ?>" />

    контроллер

    if (isset($this->request->post['keyword'])) {

                                                   $this->data['keyword'] = $this->request->post['keyword'];

                                   } elseif (isset($routecat_info)) {

                                                   $this->data['keyword'] = $routecat_info['keyword'];

                                   } else {

                                                   $this->data['keyword'] = '';

                                   }

    Модель

    .trim($this->db->escape($data['keyword']))."', '"

    И

    if ($data['keyword']) {

                                                   $this->db->query("INSERT INTO " . DB_PREFIX . "url_alias SET query = 'routecat_id=" . (int)$ routecat _id . "', keyword = '" . $this->db->escape($data['keyword']) . "'");

                                   }                              

                                   $this->cache->delete('routecat');

                    }

    Parse error: syntax error, unexpected 'if' (T_IF), expecting function (T_FUNCTION) in /sites/xn--80agbgp3aafdnsm0c.xn--p1ai/www/admin/model/catalog/routecat.php on line 48

    Ошибка  в строчке if ($data['keyword']) {

                                                   $this->db->query("INSERT INTO " . DB_PREFIX . "url_alias SET query = 'routecat_id=" . (int)$ routecat _id . "', keyword = '" . $this->db->escape($data['keyword']) . "'");

                                   }

                                   $this->cache->delete('routecat');

                    }                 

    Почему здесь аналогичный категории код не работает?

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy