phpeveryday.com

The best tutorial of php, php framework, php strategies, object oriented oriented,


PHP WDDX: Recordset Element

Tag: wddx. distributed data, data type, element, recordset   Category: PHP Application
post: 30 Apr 2008 read: 238


Web Distributed Data Exchange Step By Step tutorial - Part 7: recordset is a complex data type elements. Recordset element is used for tabular data. It is two dimensional data such as comma-separated value (CSV) or records from a database. You may think it is like struct element. yes, you are right. It is like struct element but only for two dimensional. That's why many people prefer to use struct than recordset because struct can contain more complex.

A recordset element contains any number of field elements as its children. it need two attributes: rowCount and fieldnames. The value of rowCount attribute is number of rows of data. The value of the fieldNames is a comma-separated list of the names of fields. Example:

We have table like this:


ID BOOK               AUTHOR
1  PHP Undercover     Wiwit Siswoutomo
2  PHP Webservices    Ilmia

Be transformed into recordset element:


<recordset rowCount="2" fieldNames="ID,BOOK,AUTHOR">
  <field name="ID">
    <number>1</number>
    <number>2</number>
  </field>
  <field name="BOOK">
    <string>PHP Undercover</string>
    <string>PHP Webservices</string>
  </field>
  <field name="AUTHOR">
    <string>Wiwit Siswoutomo</string>
    <string>Ilmia</string>
  </field>
</recordset>


Series this article:
PHP WDDX: Introduction
PHP WDDX: Understanding Anatomy of WDDX
PHP WDDX: Understanding Data Elements
PHP WDDX: Understanding Simple Data Type
PHP WDDX: Using Array Elements
PHP WDDX: Struct Element
PHP WDDX: Recordset Element
PHP WDDX: Simple Serialization Using PHP function
PHP WDDX: Complex Serialization
PHP WDDX: Unserializing Data
PHP WDDX: Creating Web Service Server
PHP WDDX: Creating Web Service Client

| Give Your Opinion | Recommend
Share and Bookmark to: These icons link to social bookmarking sites where readers can share and discover new web pages.
digg del.icio.us technorati Ma.gnolia BlinkList

Recommended articles by other readers:
Web Services: How PHP Kiss VB.NET? (Part 1)
Chart: How to Build Cool Animation Real Time Chart
Joomla: Fast Road to Understand Component Programming
Email: Send Attachement Mail
mod_rewrite - Part 1: create your "fantasy" URL

What do You Think?
Your Name *:
Email *:
(Will not be published)
Website/URL:
Your Comment *:
* Required


615
posting