This is my query
SELECT * from status_votes where vote = 'like' and status_id = 1 and item_poster = 'LUcase'
It returns 0 rows, but when I view the table there are rows which match my query

Please let me know where I am going wrong...
This is my query
SELECT * from status_votes where vote = 'like' and status_id = 1 and item_poster = 'LUcase'
It returns 0 rows, but when I view the table there are rows which match my query

Please let me know where I am going wrong...
My assumption is that perhaps there are leading or trailing spaces in your data that aren't visible looking at the values in phpMyAdmin. Can you please try to edit a record in phpMyAdmin and see if it actually contain spaces.
Please try running this query:
SELECT *
FROM status_votes
WHERE TRIM(vote) = 'like'
AND status_id = 1
AND TRIM(item_poster) = 'LUcase';
If that doesn't work, can you please share your table structure?
item_poster = 'LUcase' will never give a match. You will have to either decrypt the column before doing the comparison or encrypt "LUcase" before passing it into the queryTry reducing your query to see which WHERE clause is causing problems:
Try these ONE line at a time:
SELECT * from status_votes where vote = 'like' and status_id = 1 and item_poster = 'LUcase'
SELECT * from status_votes where vote = 'like' and status_id = 1 and item_poster = 'Lucase'
SELECT * from status_votes where vote = 'like' and item_poster = 'LUcase'
SELECT * from status_votes where status_id = 1 and item_poster = 'LUcase'
SELECT * from status_votes where vote = 'like'
SELECT * from status_votes where status_id = 1
SELECT * from status_votes where item_poster = 'LUcase'
SELECT * from status_votes
It shouldn't be hard to isolate the problem...
item_poster like '%LUcase%'Try the following query:
SELECT * FROM `status_votes`
WHERE `vote` = 'like'
AND `status_id` = '1'
AND `item_poster` = 'LUcase'