Get PropertyNames and Values


posted by Eric A. Duncan
Mon, Jul 17 2006

Downloads: 436
File size: 1.1kB
Views: 2,135
Get PropertyNames and Values

This was originally written for CS 1.1, but should work with any table that has the PropertyNames and PropertyValues in the column list.  Such as aspnet_Profile, cs_UserProfile, as well as cs_Posts, cs_Threads, and cs_Sections.

This can be useful in doing full searches on this text.  But it's very costly on the database because you'll have to create a CURSOR to loop through all of your records, select the PropertyNames and PropertyValues from each record, and pass it to this function (or select straight from the FUNCTION in your queries.

Notes from the author (ScottW):

CS uses ExtendedAttributes to allow metadata about a post, user, or section to be stored
in a special ':' delimited format. This enables storing metadata without adding new columns
to any tables, changing sprocs, etc.

However, any data stored in this format is not easily queryable (so use it wisely Smile

Occassionaly, you may want to query against this data. This function should make that task simple!

Keys are stored in this format: string:S:Int:Int = Key + :S : Starting Location : Length :

An example: 'Theme:S:0:7Big SmileummyTotalPosts:S:7:1:BannedUntil:S:8:21:UserBanReason:S:29:5:'

Values are stored in a single string with no spaces between them.
An example: 'default04/20/2005 12:16:41 AMOther'

Theme starts a 0 and continues for 7 characters (default)
dummyTotalPosts starts at 7 and coninutes for 1 character (0)
BannedUntil starts at 8 and continues for 21 characters (4/20/2005 12:16:41 AM)

Comments

games for all wrote re: Get PropertyNames and Values
on Mon, Aug 27 2007 2:47 PM
nise ... thank you
game wrote re: Get PropertyNames and Values
on Wed, Aug 29 2007 7:43 AM
Thanks
forum. wrote re: Get PropertyNames and Values
on Thu, Aug 30 2007 12:56 AM
god thanks ....
swish wrote re: Get PropertyNames and Values
on Fri, Aug 31 2007 3:08 AM
very nice Thanks
mhmdkhamis wrote re: Get PropertyNames and Values
on Tue, Sep 11 2007 9:22 AM
good
mhmdkhamis wrote re: Get PropertyNames and Values
on Tue, Sep 11 2007 9:22 AM
nice post
mhmdkhamis wrote re: Get PropertyNames and Values
on Tue, Sep 11 2007 9:24 AM
amazing
upload photos wrote re: Get PropertyNames and Values
on Fri, Oct 5 2007 4:27 AM
thaaanks ya ..
tmorton wrote re: Get PropertyNames and Values
on Mon, Feb 11 2008 11:44 PM
This helped me today. Thanks, Eric!
m7mmad wrote re: Get PropertyNames and Values
on Tue, Feb 26 2008 8:09 PM
Really helpful , Thanks
wrote re: Get PropertyNames and Values
on Wed, Jul 23 2008 8:35 AM
wrote re: Get PropertyNames and Values
on Wed, Jul 23 2008 8:36 AM
wrote re: Get PropertyNames and Values
on Wed, Jul 23 2008 8:36 AM
afif wrote re: Get PropertyNames and Values
on Mon, Jul 28 2008 9:49 AM
thanx alot Really helpful ...
marko wrote re: Get PropertyNames and Values
on Sat, Aug 2 2008 4:08 AM
thaaaaaaaanx
منتدى كوره wrote re: Get PropertyNames and Values
on Sat, Aug 9 2008 6:11 AM
thank you .
asr1r wrote re: Get PropertyNames and Values
on Sat, Aug 30 2008 3:22 PM
Dr.Adams wrote re: Get PropertyNames and Values
on Sun, Oct 19 2008 6:39 PM
Dr.Adams wrote re: Get PropertyNames and Values
on Tue, Oct 21 2008 10:50 AM

Dulche

Dr.Adams wrote re: Get PropertyNames and Values
on Mon, Oct 27 2008 5:10 PM

Lumberto!

**************************************

www.iknow.co.jp/.../Celexa

Dr.Adams wrote re: Get PropertyNames and Values
on Wed, Oct 29 2008 3:01 PM

Sowaspe

Powered by Community Server (Commercial Edition), by Telligent Systems

Copyright© 2008 Telligent Systems Inc. All rights reserved
CommunityServer.com  •  Telligent.com