Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'a0_.parent_id' in 'field list' #37

Open
cppfuns opened this issue Aug 14, 2018 · 1 comment

Comments

@cppfuns
Copy link

cppfuns commented Aug 14, 2018

image

@kesar You can view the information from the URL of this test.
http://47.75.202.46:8000/actions?page=1

mysql> SELECT count(a.id) as cant FROM actions a JOIN transactions t ON a.transaction_id = t.id WHERE a.parent_id = 0;
ERROR 1054 (42S22): Unknown column 'a.parent_id' in 'where clause'

@cppfuns
Copy link
Author

cppfuns commented Aug 14, 2018

void actions_table::create()
{
*m_session << "CREATE TABLE actions("
"id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,"
"account VARCHAR(12),"
"transaction_id VARCHAR(64),"
"seq SMALLINT,"
"parent INT DEFAULT NULL,"
"name VARCHAR(12),"
"created_at DATETIME DEFAULT NOW(),"

parent and parent_id do not correspond

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant