{"action":"created","issue":{"url":"https://api.github.com/repos/top-think/think-orm/issues/23","repository_url":"https://api.github.com/repos/top-think/think-orm","labels_url":"https://api.github.com/repos/top-think/think-orm/issues/23/labels{/name}","comments_url":"https://api.github.com/repos/top-think/think-orm/issues/23/comments","events_url":"https://api.github.com/repos/top-think/think-orm/issues/23/events","html_url":"https://github.com/top-think/think-orm/issues/23","id":308263689,"number":23,"title":"为何设置数据表前缀不生效？","user":{"login":"shuguang","id":1232375,"avatar_url":"https://avatars3.githubusercontent.com/u/1232375?v=4","gravatar_id":"","url":"https://api.github.com/users/shuguang","html_url":"https://github.com/shuguang","followers_url":"https://api.github.com/users/shuguang/followers","following_url":"https://api.github.com/users/shuguang/following{/other_user}","gists_url":"https://api.github.com/users/shuguang/gists{/gist_id}","starred_url":"https://api.github.com/users/shuguang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shuguang/subscriptions","organizations_url":"https://api.github.com/users/shuguang/orgs","repos_url":"https://api.github.com/users/shuguang/repos","events_url":"https://api.github.com/users/shuguang/events{/privacy}","received_events_url":"https://api.github.com/users/shuguang/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-24T13:45:54Z","updated_at":"2018-03-24T14:39:26Z","closed_at":"2018-03-24T14:36:36Z","author_association":"NONE","body":"```\r\n<?php\r\nrequire_once './vendor/autoload.php';\r\nuse think\\Db;\r\n\r\n$dbconf = [\r\n    'type' => 'mysql',\r\n    'hostname' => '127.0.0.1',\r\n    'database' => 'job_nad',\r\n    'username' => 'root',\r\n    'password' => 'root',\r\n    'hostport' => '3306',\r\n    'params' => [],\r\n    'charset' => 'utf8mb4',\r\n    'prefix' => 'tb_',\r\n];\r\nDb::setConfig($dbconf);\r\n$data = Db::table('user')->find();\r\nvar_dump($data);\r\n\r\n报错信息\r\nPS D:\\developer\\job.app\\nad-test> php 1.php\r\nPHP Fatal error:  Uncaught exception 'think\\db\\exception\\PDOException' with message 'SQLSTATE[42S02]: Base table or view not found: 1146 Table 'job_nad.user' doesn't exist' in D:\\developer\\job.app\\nad-test\\vendor\\topthink\\think-orm\\src\\db\\Connection.php:670\r\nStack trace:\r\n#0 D:\\developer\\job.app\\nad-test\\vendor\\topthink\\think-orm\\src\\db\\connector\\Mysql.php(90): think\\db\\Connection->query('SHOW COLUMNS FR...', Array, false, true)\r\n#1 D:\\developer\\job.app\\nad-test\\vendor\\topthink\\think-orm\\src\\db\\Connection.php(376): think\\db\\connector\\Mysql->getFields('user')\r\n#2 D:\\developer\\job.app\\nad-test\\vendor\\topthink\\think-orm\\src\\db\\Connection.php(412): think\\db\\Connection->getTableInfo('user', 'pk')\r\n#3 D:\\developer\\job.app\\nad-test\\vendor\\topthink\\think-orm\\src\\db\\Query.php(1912): think\\db\\Connection->getPk('user')\r\n#4 D:\\developer\\job.app\\nad-test\\vendor\\topthink\\think-orm\\src\\db\\Connection.php(777): think\\db\\Query->getPk(Array)\r\n#5 D:\\developer\\job.app\\nad-test\\vendor\\topthink\\think-orm\\src\\db\\Query.php(2453): think\\db\\Connection->find(Ob in D:\\developer\\job.app\\nad-test\\vendor\\topthink\\think-orm\\src\\db\\Connection.php on line 670\r\n```"},"comment":{"url":"https://api.github.com/repos/top-think/think-orm/issues/comments/375894042","html_url":"https://github.com/top-think/think-orm/issues/23#issuecomment-375894042","issue_url":"https://api.github.com/repos/top-think/think-orm/issues/23","id":375894042,"user":{"login":"shuguang","id":1232375,"avatar_url":"https://avatars3.githubusercontent.com/u/1232375?v=4","gravatar_id":"","url":"https://api.github.com/users/shuguang","html_url":"https://github.com/shuguang","followers_url":"https://api.github.com/users/shuguang/followers","following_url":"https://api.github.com/users/shuguang/following{/other_user}","gists_url":"https://api.github.com/users/shuguang/gists{/gist_id}","starred_url":"https://api.github.com/users/shuguang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shuguang/subscriptions","organizations_url":"https://api.github.com/users/shuguang/orgs","repos_url":"https://api.github.com/users/shuguang/repos","events_url":"https://api.github.com/users/shuguang/events{/privacy}","received_events_url":"https://api.github.com/users/shuguang/received_events","type":"User","site_admin":false},"created_at":"2018-03-24T14:39:26Z","updated_at":"2018-03-24T14:39:26Z","author_association":"NONE","body":"手册中看到name()方法了，关闭吧 ~_~!"}}
{"actor":{"display_login":"shuguang"}}