Giter VIP home page Giter VIP logo

Comments (6)

prog-it avatar prog-it commented on June 13, 2024

Да, есть (sqlite, sqlite3...). Поддерживаются все базы, с которыми работает PDO драйвер.

from asterisk-cdr-viewer-mod.

dmitrii507 avatar dmitrii507 commented on June 13, 2024

Отлично, а как настроить подключение к ней?

from asterisk-cdr-viewer-mod.

prog-it avatar prog-it commented on June 13, 2024

Сам sqlite не пробовал, но должно работать.
Нужно будет изменить в файле index.php строчку:
$dbh = new PDO("$db_type:host=$db_host;port=$db_port;dbname=$db_name", $db_user, $db_pass, $db_options); примерно на это $dbh = new PDO('sqlite:my/database/path/database.db');. Здесь указан примерный путь к файлу с sqlite, тогда параметры $db_* в конфиге можно уже не изменять.

Отпишитесь, если будет работать, добавлю для sqlite параметры подключения более красивым образом.

from asterisk-cdr-viewer-mod.

dmitrii507 avatar dmitrii507 commented on June 13, 2024

Заменил строку при клике на найти пишет
PDO::errorInfo(): Array ( [0] => HY000 [1] => 26 [2] => file is encrypted or is not a database )

from asterisk-cdr-viewer-mod.

prog-it avatar prog-it commented on June 13, 2024

Что-то с несоответствием версии sqlite и PHP. Посмотрите в Google по описанию ошибки. Можно посмотреть для начала здесь: здесь и здесь

У себя не могу проверить, т.к. использую MySQL. Возможно базу нужно переконвертировать в другой формат, например sqlite3.

from asterisk-cdr-viewer-mod.

vasvlad avatar vasvlad commented on June 13, 2024

Для успешного испльзования sqlite3 необходимо также поправить вот эту строку
$query = "SELECT *, unix_timestamp(calldate) as call_timestamp FROM $db_table_name $where $order $sort LIMIT $result_limit";
на вот такую:
$query = "SELECT *, strftime('%s', calldate) as call_timestamp FROM $db_table_name $where $order $sort LIMIT $result_limit";
И есть проблемы с триггером.

from asterisk-cdr-viewer-mod.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.