Reputation: 1035
Query =
SELECT * FROM options WHERE 'key' = 'exchange_rate'
Table structure =
key varchar(500) latin1_swedish_ci
value text latin1_swedish_ci
Table content
Key | Value
exchange_rate | 25
Program
phpMyAdmin 4.0.4 Mysql
Result
0 Rows returned
Do you know what the problem is here?
Upvotes: 0
Views: 45
Reputation: 8334
try this query:
SELECT * FROM options WHERE `key` = 'exchange_rate'
instead of :
SELECT * FROM options WHERE 'key' = 'exchange_rate'
Upvotes: 2
Reputation: 2938
Qoutes are used to show varchar values not column name
SELECT * FROM options WHERE `key` = 'exchange_rate'
Upvotes: 0