整型數據怎麼用ldapsearch查啊?
請問一下怎麼用ldapsearch查整型的數據
我定義了這樣的屬性
Attributetype ( 6.0.1.5 NAME 'buyprice'
DESC 'buyprice'
SYNTAX 1.3.6.1.4.1.1466.115.121.1.27)
1.3.6.1.4.1.1466.115.121.1.27 是Integer
添加了下面的條目:
dn:uidx=BJ0000002,pro=beijing,dc=fdc,dc=com
uidx:BJ0000002
objectclass:houseinfo
objectclass:top
city:beijing
address:Chaoyangqu Sanyuanqiao Shuguangxili No.5 Fenghuangcheng
squar:195
struct:31
rentPrice:3500
buyPrice:12205
comment:No trafic jam,many bus stop nearby
contact:Zhangyi
mailto:liwei19760420@126.com
phone:84467357
查找語句用ldapsearch -b "dc=fdc,dc=com" -s sub "rentPrice=3500"
但是什麼都查不到
# extended LDIF
#
# LDAPv3
# base <dc=fdc,dc=com> with scope sub
# filter: rentPrice=3500
# requesting: ALL
#
# search result
search: 2
result: 0 Success
# numResponses: 1
另外,可不可以用範圍來查找啊,比如 rentprice>=3000這樣的語句...如果要用這樣的語句,屬性設成int可不可以啊?
《解決方案》
這真是個好問題:)
在我的應用中沒出現這樣的需求,但我很想知道結論,可惜我現在沒有試驗環境了。這個查下RFC文檔的相關部分或做個小實驗就能知道了,畢竟屬性值的類型就那麼幾個。