this query giving me error when add key
column, help?
username
, product
composite primary key, in case.
mysql> select * sw_product_session username='admin'; +----------+----------+------------+----------------------------+ | username | product | expire | key | +----------+----------+------------+----------------------------+ | admin | printbox | 1373550885 | 2ijm77cpnfc7miktasopkik2q2 | +----------+----------+------------+----------------------------+ 1 row in set (0.00 sec) mysql> select * sw_product_session username='admin' , product='printbox'; +----------+----------+------------+----------------------------+ | username | product | expire | key | +----------+----------+------------+----------------------------+ | admin | printbox | 1373550885 | 2ijm77cpnfc7miktasopkik2q2 | +----------+----------+------------+----------------------------+ 1 row in set (0.00 sec) mysql> select * sw_product_session username='admin' , product='printbox' , key='2ijm77cpnfc7miktasopkik2q2'; error 1064 (42000): have error in sql syntax; check manual corresponds mysql server version right syntax use near 'key='2ijm77cpnfc7miktasopkik2q2'' @ line 1
you need remember reserved words need escaped:
and `key`='...'
Comments
Post a Comment