Coder Social home page Coder Social logo

Database Query Error about shortlinks HOT 4 OPEN

benzbrake avatar benzbrake commented on July 23, 2024
Database Query Error

from shortlinks.

Comments (4)

benzBrake avatar benzBrake commented on July 23, 2024

开启调试模式 给出具体报错

from shortlinks.

90zm avatar 90zm commented on July 23, 2024

Table 'typecho.typecho_shortlinks' doesn't exist Typecho\Db\Adapter\SQLException: Table 'typecho.typecho_shortlinks' doesn't exist in /home/wwwroot/lnmp01/domain/[域名]/web/var/Typecho/Db/Adapter/Mysqli.php:114 Stack trace: #0 /home/wwwroot/lnmp01/domain/[域名]/web/var/Typecho/Db.php(391): Typecho\Db\Adapter\Mysqli->query('SELECT target...', Object(mysqli), 1, 'SELECT', 'typecho_shortli...') #1 /home/wwwroot/lnmp01/domain/[域名]/web/var/Typecho/Db.php(440): Typecho\Db->query(Object(Typecho\Db\Query)) #2 /home/wwwroot/lnmp01/domain/[域名]/web/usr/plugins/ShortLinks/Action.php(162): Typecho\Db->fetchRow(Object(Typecho\Db\Query)) #3 /home/wwwroot/lnmp01/domain/[域名]/web/usr/plugins/ShortLinks/Action.php(107): ShortLinks_Action->getTarget('aHR0cHM6Ly9naXR...') #4 /home/wwwroot/lnmp01/domain/[域名]/web/var/Typecho/Router.php(99): ShortLinks_Action->shortlink() #5 /home/wwwroot/lnmp01/domain/[域名]/web/index.php(23): Typecho\Router::dispatch() #6 {main}
您好,这是报错信息。[域名]做了替换。

from shortlinks.

90zm avatar 90zm commented on July 23, 2024

好像是数据库没有办法创建,手动创建了表和 列,现在可以正常运行了。
`USE typecho;

CREATE TABLE typecho_shortlinks (
id int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
short_key varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
target_url varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
PRIMARY KEY (id),
UNIQUE KEY short_key (short_key)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
ALTER TABLE typecho_shortlinks ADD COLUMN target VARCHAR(255) NOT NULL;
ALTER TABLE typecho_shortlinks ADD COLUMN key VARCHAR(255) NOT NULL;
`

from shortlinks.

benzBrake avatar benzBrake commented on July 23, 2024

你是什么环境,什么数据库,数据库用户有没有建表权限

from shortlinks.

Related Issues (19)

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.