Reputation: 31
I want to display only the specific user details as shown in link. For kind information, I just want to say that I am using php and mysql and need to display 'user2' details from that previous table(customer) given as picture link].help with valuable suggestion.
Upvotes: 0
Views: 145
Reputation: 19945
Select id, sndusr, SUBSTRING_INDEX(rcvusr, '@@', 1), title
From xyz
Where rcvusr = 'user2' or
rcvusr like 'user2@@%'
Here is the documentation : http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_substring-index
Upvotes: 0
Reputation: 7
Try this
SELECT id,rcvusr FROM xyz WHERE rcvusr like 'user2%' ORDER BY eid desc LIMIT 10
Upvotes: 1