rathins
rathins

Reputation: 31

display mysql data in PHP with explode

enter image description here

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

Answers (2)

Lorenz Meyer
Lorenz Meyer

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

Naveenkumar
Naveenkumar

Reputation: 7

Try this

SELECT id,rcvusr FROM xyz WHERE rcvusr like 'user2%' ORDER BY eid desc LIMIT 10 

Upvotes: 1

Related Questions