简体   繁体   中英

unknown column error when trying to open table

so after running the query below, whenever i try to open the affected table, it says "unknown column doc.section in order clause". i can still run queries on the said table but i can no longer access the table by using the left panel on phpmyadmin.

query:

select pending.*
from (
    select distinct doc.*, users.dept_id
    from list_users users, exit_doc doc
    inner join ( 
        select q.section, 
        max(q.subsection) subsection
        from exit_doc q 
        group by q.section ) latest
    on doc.section = latest.section
    and doc.subsection = latest.subsection
    where doc.user_id = users.user_id) pending
inner join (
    select approvers.dept_id, approvers.role_code 
    from approvers 
    where user_id = 10004 
    and delete_flag = 0) user
on pending.next_user = user.role_code 
and pending.dept_id = user.dept_id

did my query somehow affect the structure of the table? the error said unknown column on order clause but i didnt use any order in my query?

您是否尝试清除浏览器的Cookie和缓存?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM