[wp-hackers] What do the key's mean on wp_attachment_metadata

Ryan Scheuermann ryan at concept64.com
Wed Jun 7 12:47:57 GMT 2006


You can see what I mean in the get_post_meta function.  It calls another 
function called "maybe_unserialize".  If you use get_post_meta to 
retrieve the data, it'll unserialize the array for you.  :-)

Ryan Scheuermann wrote:
> Hi Mark,
>
> That value is a serialized (string-version) of an array.  Those 
> numbers are the number of bytes (characters) for the following value.  
> To pull the data out, just unserialize the value as an array.  If you 
> follow me?
>
> Ryan Scheuermann
>
> ----
> Concept 64, Inc. | Phone: 610.349.0703 | Web: www.concept64.com
>
>
>
> Mark Harwood wrote:
>> Hi there,
>>
>> Im currently trying to rack my brain around the way that a post's 
>> attached files work, ive figured out what data needs to be pulled 
>> from the database but im stuck on understanding what some of the 
>> values in wp_attachment_metadata mean.
>>
>> Below is a link to the wp_attachment_metadata for 3 images uploaded 
>> to a post
>>
>> http://wilcoding.xs4all.nl/Wilco/Pastecode/2992/showpaste.aspx
>>
>> As you can see almost all the key's are the same before the values, 
>> apart from two of them  s:22 changes to s:23 and s:89 to s:87
>>
>> Why is this? and what do each of these represent?
>>
>> Im just trying to understand them a bit more before i go off and do 
>> some regex's to pull out the data i need.
>>
>> Many thanks
>> Mark 'Phunky' Harwood
>> Founder of EuroCSS.NET and mEm-Gaming.co.uk
>> _______________________________________________
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>>
>>
>>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
>
>


More information about the wp-hackers mailing list