• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 221
  • Last Modified:

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

hello experts,

why is this query not working for me?

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

ERROR:
#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;...
thx,
0
epifanio67
Asked:
epifanio67
  • 2
1 Solution
 
Kevin CrossChief Technology OfficerCommented:
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.
0
 
Kevin CrossChief Technology OfficerCommented:
To be more clear:
SELECT * FROM `aex_session` 
WHERE `session_id` = 'tacs6t1ueqtnajp3r2vd66tls2';

Open in new window

0
 
epifanio67Author Commented:
yep... that was the issue..

thanks so much..

regards,
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now