问题
I wanted to ask based on this query which I have.
SELECT username,count(*) as description
FROM products
WHERE
description LIKE '%Yes%'
or
description LIKE '%yes%'
GROUP BY username
ORDER BY description ASC
For your information, the outcome will be like this.
username | description
a | 3
b | 1
I wanted to ask if I can make it into this form?
rank | username | description
1 | a | ♥ ♥ ♥
2 | b | ♥
The ♥ will be an image, not any symbol, can blob achieve this? What can I do to do this?
In my previous question, mysql, ASC a series of number using existed data , some of the members give me this, but how can I apply into my PHP code to display in my android XML?
SELECT (@rn := @rn + 1) as rank, username, numdescription
FROM (SELECT p.username, count(*) as numdescription
FROM products p
WHERE description LIKE '%Yes%' or description LIKE '%yes%'
GROUP BY p.username
) p CROSS JOIN
(SELECT @rn := 0) vars
ORDER BY numdescription DESC;
来源:https://stackoverflow.com/questions/26614427/turn-number-in-tables-into-an-image-and-also-display-asc-number-in-mysql-using-p