Mysql: query not working, why? pls take a look...

Posted on 2011-10-14
Last Modified: 2012-05-12
hello experts,

why is this query not working for me?

SELECT * FROM `aex_session` WHERE `session_id` = tacs6t1ueqtnajp3r2vd66tls2

#1054 - Unknown column 'tacs6t1ueqtnajp3r2vd66tls2' in 'where clause'

TABLE: aex_session
time                    session_id                   data
10.14.11 17:21               tacs6t1ueqtnajp3r2vd66tls2       a:2:{s:6:"expire";i:120;...
10.14.11 17:26               tacs6t1ueqtnajp3r2vd44444test2       a:2:{s:6:"expire";i:120;...
10.14.11 17:32               tacs6t1ueqtnajp3r2vd33333test3       a:2:{s:6:"expire";i:120;...
Question by:epifanio67
    LVL 59

    Accepted Solution

    Do you have it typed exactly like that with no quotes around the session_id value you are testing? If so, that is the issue. At least that is the only thing that appears wrong and makes sense with the error message you are getting as without the quotes it thinks it is a column name which of course errors since one of that name does not exist.
    LVL 59

    Expert Comment

    by:Kevin Cross
    To be more clear:
    SELECT * FROM `aex_session` 
    WHERE `session_id` = 'tacs6t1ueqtnajp3r2vd66tls2';

    Open in new window


    Author Closing Comment

    yep... that was the issue..

    thanks so much..


    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    Join & Write a Comment

    'Between' is such a common word we rarely think about it but in SQL it has a very specific definition we should be aware of. While most database vendors will have their own unique phrases to describe it (see references at end) the concept in common …
    If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now