Tibco General Interface & MySql?

I would like to send something like this: myPage.php?product_category=someCategory and have the results in a list box. I think that is a good newbie project for me. Anyone have any advice? See this post : Howto: Establish a connection to a MySQL Database in Tibco GI - The answer! GI is a client to HTTP based services (usually XML or SOAP, but also JSON, and anything else over HTTP if need be)... Here's a few things I found on creating XML services with PHP and mySQL... Output mySQL data as XML with PHP Build your own Web Service with PHP and XML-RPC [PHP & MySQL ...Harry takes us one step further into the world of Web Services. Here he explains how to build your own Web Service - a news feed - using PHP and XML-RPC. http://www.sitepoint.com/article/own-web-service-php-xml-rpc - 33k - Cached - Similar pages Instant XML with PHP and PEAR::XML_Serializer PHP & MySQL TutorialsPEAR::XML_Serializer is PHP's Swiss Army Knife for XML. ... building REST-based Web services, storing data in XML for later recall by your applications, ... http://www.sitepoint.com/article/xml-php-pear-xml_serializer - 45k - Cached - Similar pages More results from www.sitepoint.com Use XML to Build Services Cheaply Using PHP and MySQLUsing the open source technologies of PHP and MySQL you can create server-side applications that abstract databases and return XML. http://www.devx.com/xml/article/16418 - 78k - Cached - Similar pages

Generated by Clearspace on 2011-01-07-06:00 1

or you could convert your XML into CDF (whee). Look here: GI 3. You'd like to render this XML is a GI data control. like a list? The trick is that GI uses what we call Common Data Format as a way to vastly simplify how data gets into UI components without having to write XML. You could rewrite the XSL for each of your onscreen GUI components to understand your XML (ugh). you will have a PHP page that will return XML (preferably CDF) that you can then request from within your GI application using the classes within the jsx3. Michael uses this exact XML hierarcy structure in his latest WebEx Video Tutorial on transforming XML to CDF http://tinyurl. --Luke If I understand your question. but would this save me any work. At this point. you already have a PHP that will return XML data in some arbitrary format. Form. or would this create another step for me? Yes.com/8bxbl. and Service). If you're using 3.2+.Tibco General Interface & MySql? I don't have anything specific beyond going to the PHP/mySQL sites and reading up on how to install and use them. you should output in CDF. _The XML is generated as CDF XML. here is the PHP code I used to transform mySQL query results to XML. which will save you a step on the client side (GI) from having to convert the generic XML to CDF for display in GI --dhwang <? // PHP File to query a MySQL database and generate the resultset as an // XML Hierarcy. so no conversion on GI is needed_ // The XML will be generated using a <data><record> hierarchy with the // result having the indices stored as Generated by Clearspace on 2011-01-07-06:00 2 . Once you know how to use PHP/mySQL to generate a regular HTML page. then it's much easier. you can easily modify your PHP code to generate XML instead.net package (Request.6 JSON sample using Yahoo Travel Sample : RSS reader peachey In case anyone is interested. All GI data components which render data understand how to render ZCDF. we've written the XSL for you. You can use the new data mapper to create a mapping rule (what we call Common Transfer Format or CXF) between your XML and GI's CDF. This could easily be converted to output CDF docs too.

MYSQL_ASSOC)) { $i=0. // Output the XML headers echo( "<?xml version='1. // Pull the service type from the URL parameter service=whatever $condition = $_GET[ 'service'].0' ?>"). foreach ($line as $col_value) Generated by Clearspace on 2011-01-07-06:00 3 . $db) or die( "Unable to Select Database"). // Open the database and select database $db = mysql_connect( "localhost". ""). @ mysql_select_db( "products". echo( "<data jsxid='jsxroot'>").Tibco General Interface & MySql? attributes. "root" . and the item storing // the column values as attributes to compress the xml to the smallest // usable footprint. // Generate the query to run based on the condition passed in the service parameter if ($condition== "reps") { $query = "SELECT * FROM reps". } // Execute the query to get the results $result = mysql_query($query) or die( "Query Failed"). while ($line = mysql_fetch_array($result. // Clear the response buffer flush(). // Iterate throught the result rows $recordcount = mysql_numrows($result).

// Clear up the resultset mysql_free_result($result).com" user_password="joejoe" setup_completed="" company_name="CHMI" street="chmi street" street2="chmi street2" city="Keokuk" state="Iowa" country="United States" zipcode="52632" bus_phone="319-555-1212" mob_phone="319-555-1212" fax="319-555-1212" account_approved="1" discount_percent="" account_type="CASH" /> </data> Generated by Clearspace on 2011-01-07-06:00 4 .Tibco General Interface & MySql? { $fieldname=mysql_field_name($result. ?> You would then get a response like this: <?xml version="1. close the record tag for this record print ( "/>").$i). } // When done with all the records. } // When done. // And close the database. $i++. mysql_close($db). } else // For all other rows. if ($i==0) { // For the first column (where $i=0) output the <record> tag // with the id set to the column value and then begin the rowitems child print "<record jsxid='$col_value' ". close the XML tag for the document print( " </data>"). output the fieldname=fieldvalue attributes on rowitem print ( " $fieldname='$col_value'").0" ?> <data jsxid="jsxroot"> <record jsxid="4" first_name="Joe" last_name="Hendrickson" role="USER" email_address="joe@chmi.

the conversion effort of most documents (< 500 records or so) is pretty negligable. output CDF. That way you can simple get your document and put it into cache. if you have easy control over the back end. the arbitrary XML I used in the video isn't anything special. So. I'm sure it will be useful. All of that being said. obviating the conversion step. Just use one of the two conversion techniques. no worries. FYI. Michael This resource was generated from the following thread: Tibco & MySql? Generated by Clearspace on 2011-01-07-06:00 5 . it was just some XML that someone else had in their post in the forum when they asked a similar question. As far as your question about whether you should output CDF or some arbitrary XML.Tibco General Interface & MySql? Thanks for posting this. If you don't. outputting CDF will save a step on the client.