从数据库检索的排序号 [英] sort number retrieved from database

查看:83
本文介绍了从数据库检索的排序号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨 我从数据库中选择了产品的数据(图像,价格,名称)并将其显示在datalist中.问题是我想根据价格的升序和降序对数据进行排序,但我不知道该怎么做
我在select语句中使用了order by,但是在number

解决方案

上无法正常工作.检查价格列的类型.确保它是数字类型(int /decimal)等,而不是varchar.


hi i select data( image, price ,name) of product from database and displayed it in datalist.the problem is i want to sort that data acording the price acsenging and decsending but i don not what i do
i used order by in select statement but it did not work correctly with number

解决方案

Check the type of the price column. Make sure it is a number type (int / decimal) etc and not varchar.


这篇关于从数据库检索的排序号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆