Autorius Tema: MySQL Error  (Skaityta 192 kartus)

Neprisijungęs GTIPOWER

  • Naujokas
  • *
  • Įrašai: 170
  • Karma: +0/-0
    • Žiūrėti profilį
MySQL Error
« Įrašytas: 2013-10-28 22:31:06 pm »
Tai va atsisiunciau viena man reikalinga moda. Isirases gavau toki error:

The Error returned was:
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

PhP kodas kur yra klaida:
$this->ipbdb->query("SELECT tag_meta_id, tag_text FROM {$this->ipbconfig['sql_tbl_prefix']}core_tags WHERE tag_prefix = '1' AND tag_meta_app = 'forums' ORDER BY tag_added DESC LIMIT {$this->config['sql_limit']}");
Ačiu iš anksto

Va pilnas kodas.

// priešdėliai
$topicPrefixes = array();
if($this->config['topics_cache_time'] != 0) $prefixesCache = $this->getCache("prefixes");
if($prefixesCache['time'] and (($prefixesCache['time'] + ($this->config['topics_cache_time'] * 60)) > time())) {
$topicPrefixes = $prefixesCache['data'];
} else {
$this->ipbdb->query("SELECT tag_meta_id, tag_text FROM {$this->ipbconfig['sql_tbl_prefix']}core_tags WHERE tag_prefix = '1' AND tag_meta_app = 'forums' ORDER BY tag_added DESC LIMIT {$this->config['sql_limit']}");
while($row = $this->ipbdb->get_row()) {
$row = $this->encodeArray($row);
$topicPrefixes[$row['tag_meta_id']] = $row['tag_text'];
}
if($this->config['topics_cache_time'] != 0) $this->setCache("prefixes", $topicPrefixes);
}

$topics = array();
$ipb_settings = $this->getIpbSettings();
foreach($this->getTopics() as $id=>$topic) {

$showTopic = false;
foreach($this->getAllowedForums() as $forumid) {
if($topic['forum_id'] == $forumid) {
$showTopic = true;
break;
}
}

if(count($this->config['exclude_forums']) > 0) {
foreach($this->config['exclude_forums'] as $excluded_forum) {
if($topic['forum_id'] == $excluded_forum) {
$showTopic = false;
break;
}
}
}

if(($this->config['show_closed'] != "1") and ($topic['state'] != "open")) $showTopic = false;

if($showTopic) {

$topic['start_date'] = $this->formatDate($this->config['create_date_format'], $topic['start_date']+($this->config['date_adjust']*60));
$topic['last_post'] = $this->formatDate($this->config['lastpost_date_format'], $topic['last_post']+($this->config['date_adjust']*60));

if(($topic['posts'] + 1) > $ipb_settings['hot_topic']) {
$topic['hot'] = "1";
} else {
$topic['hot'] = "0";
}

Prisijungęs Lukas Liesis

  • Administratorius
  • Herojus
  • ******
  • Įrašai: 7385
  • Karma: +226/-15
    • Žiūrėti profilį
    • mano CV
Ats: MySQL Error
« Atsakymas #1 Įrašytas: 2013-10-30 08:54:09 am »
sql uzklausoj klaida, issiprintink pries siunciant i duombaze, kad matytum ka ten is tiesu bandai nusiust ir pamatysi kur klaida
Jūsų draugas, kolega ir puslapio administratorius,

Lukas.

Manualai.lt Facebooke
serveriai.lt 50% nuolaida!
Free Hosting
Free Templates

Manualai.lt Forumas

Ats: MySQL Error
« Atsakymas #1 Įrašytas: 2013-10-30 08:54:09 am »