Turn number in tables into an image and also display ASC number in mysql using PHP

本秂侑毒 提交于 2020-01-07 06:54:50

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!