SEO-MAN

SEO-MAN
Рейтинг
187
Регистрация
25.06.2007
Chukcha:
а какая версия mysql на сервере?

5.5.18

SEO-MAN добавил 04.12.2011 в 00:07

А там где работает 5.1.57 и 5.1.42

Кто может помочь (платно видимо) - отпишите в личку.

Я вот не знаю какие настройки мускула смотреть.

db.php

<?php

class OkiDb {
private $link;
private $prefix;

public function connect($host, $user, $pass, $dbname, $prefix = '', $names = null)
{
$this->link = mysql_connect($host, $user, $pass);
if (!$this->link) {
$this->dieError('Cannot connect to DB ' . mysql_error());
}
if (!mysql_select_db($dbname, $this->link)) $this->dieError('Cannot select DB');
if ($names != null) {
mysql_query('SET NAMES ' . $names, $this->link);
}
$this->prefix = $prefix;
}

private function dieError($msg = 'MySql Error')
{
die($msg . ': ' . mysql_error());
}

public function query($sql)
{
return mysql_query($sql, $this->link);
}

public function escape($str)
{
return mysql_real_escape_string($str, $this->link);
}

public function buildQuery($query, $args)
{
$i = 0;
if (!is_array($args)) $args = array($args);
while ($i < count($args) && ($pos = strpos($query, '?')) !== false) {
$repl = "'" . $this->escape($args[$i++]) . "'";
$query = substr_replace($query, $repl, $pos, 1);
}
return $query;
}

public function select($table, $cols = '*', $where = null, $order = null, $joins = null, $limit = null)
{
$sql = "SELECT $cols FROM {$this->prefix}$table";
if (is_array($where)) {
$sql .= ' WHERE ' . $this->buildQuery($where[0], $where[1]);
} else if ($where != null) {
$sql .= " WHERE $where";
}
if ($order != null) $sql .= " ORDER BY $order";
if ($limit != null) $sql .= " LIMIT $limit";
return $this->query($sql);
}

/**
* fetch all into associative array
* @return array
*/
public function fetchAll($table, $cols = '*', $where = null, $order = null, $joins = null, $limit = null)
{
$result = $this->select($table, $cols, $where, $order, $joins, $limit);
if ($result === false) $this->dieError('DB SELECT query failed');
$ret = array();
while (($row = mysql_fetch_assoc($result)) !== false) {
$ret[] = $row;
}
return $ret;
}

public function fetchRow($table, $cols = '*', $where = null, $order = null, $joins = null)
{
$result = $this->select($table, $cols, $where, $order, $joins, 1);
if ($result === false)
$this->dieError('DB SELECT query failed');
$ret = mysql_fetch_assoc($result);
return $ret;
}

public function fetchOne($table, $column = '*', $where = null, $order = null)
{
$row = $this->fetchRow($table, $column, $where, $order);
return $row !== false ? $row[$column] : false;
}

public function insert($table, array $data)
{
if (count($data) == 0) return false;

$fields = '(';
$values = 'VALUES (';
foreach ($data as $key => $value) {
$fields .= '`'.$key.'`,';
$values .= "'" . $this->escape($value, $this->link)."',";
}
$fields = substr($fields, 0, -1) . ')';
$values = substr($values, 0, -1) . ')';
$sql = "INSERT INTO {$this->prefix}$table $fields $values";
if ($this->query($sql) === false) return false;
return $this->insertId();
}

public function update($table, array $data, $where = null)
{
if (count($data) == 0) return false;

$set = '';
foreach ($data as $key => $value) {
$set .= "`$key`='" . $this->escape($value) . "',";
}
$set = substr($set, 0, -1); // remove last period (,)

$sql = "UPDATE {$this->prefix}$table SET $set";

if (is_array($where)) {
$sql .= ' WHERE ' . $this->buildQuery($where[0], $where[1]);
} else if ($where != null) {
$sql .= " WHERE $where";
}

return $this->query($sql);
}

public function insertId()
{
return mysql_insert_id($this->link);
}
}

Спасибо!

Было после импорта "Давность отображения тем по умолчанию" - "за день"

Спасибо! Всё получилось!

Вот только в самих разделах - "В этом разделе нет новых сообщений за последние 30 дней."

А как сделать чтобы все старые темы показывались?

При запуске

ImpEx Database error

mysql error: Invalid SQL: SELECT data FROM datastore WHERE title = 'ImpExSession'

mysql error: Table 'b1111111.datastore' doesn't exist

mysql error number: 1146

Date: Saturday 19th 2011f November 2011 10:57:07 PM

Database: bersek1_forumk2

MySQL error: Table 'b1111111.datastore' doesn't exist

По идее нужно сначала поставить форум vBulletin 3.8.6 а потом делать импорт?

Пробую в живой форум на том же хостинге:

mpEx Database error

mysql error: Invalid SQL: CREATE TABLE impexerror (

errorid bigint(20) unsigned NOT NULL auto_increment,

errortype varchar(10) NOT NULL default '',

classnumber varchar(3) NOT NULL default '',

importid bigint(20) NOT NULL default 0,

error varchar(250) default 'NULL',

remedy varchar(250) default 'NULL',

PRIMARY KEY (errorid)

) TYPE=MyISAM

mysql 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 'TYPE=MyISAM' at line 9

mysql error number: 1064

Стандартная задача - и каждый раз для неё писать движек не логично. А вот все нынешние CMS - сыроваты.

Тема всё еще актуальна.

Народ, посоветуйте шаблон для гос учреждения?

SeoMotion:

QPL - функционал хороший, натянуть шаблон не проблема, возможность конструирования полей из админки, в т.ч. настройка полей для конкретных категорий.

Там же надо делать конфигурационные файлы, в админке нет почти ничего.... Я так и не разобрался до конца...

Я для тематической доски объявлений так и не нашел ничего полностью настраиваемого.

Всего: 897