Hi All,
I have committed to Robert That I will help him with that forum.
The key to conversion is to get the frame work going, in PHP there is
so many ways to retrieve data from database that it can look
overwhelming at that start.
and most of the example for dealing with data retrieval in PHP is a
mesh of PHP and SQL mixed together, and on the PHP forums I frequent I
see this over and over where the people can wrap there head around
dealing with data this way.
The approach Robert took helps separated the getting of the data from
the working with the data, so like in witango you know that the search
action is going to return a resultset, and then you just iterate thru
the result set, with the code Robert posted in previous email it takes
the data returned and turns it into a PHP associative array and then
you just write code base on the named result set
so as you can see it is a simple matter from this point,
below is an example of a "Search action" with a "Table of All Values"
<pre>
$query = "SQL Statement here"
$inarray = $global_app->getResultSetFromConn($myconn,$query);
if (count($inarray) > 0) {
//create table from search
$bool_header = true;
$res = "";
$res = "<table border=1><tr>";
if ($bool_header){
foreach($inarray[0] as $key => $val){
$res .= "<td align=center><b>" . $key .
"</b></td>";
}
$res .= "</tr>";
}
$res .= "<tr>";
foreach($inarray as $rows){
$colIdx = 0;
$colVal = '';
foreach ($rows as $cols){
if ($colIdx == 0) $colVal = $cols;
if ($colIdx == 0) {
$res .= "<td><a href=".$_SERVER['PHP_SELF']."?
_function=detail&row=".$colVal.">" . $cols . "</a></td>";
}else {
$res .= "<td>" . $cols . "</td>";
}
$colIdx += 1;
}
$res .= "</tr>";
}
$res .= "</table>";
echo $res;
}
</pre>
Ben
On Jan 28, 2008, at 11:50 AM, Robert Garcia wrote:
I never made it live. I have not done the extra work on this stuff,
because I have not seen more than 5 people show any more than mild
interest.
For the record, if you want me to post a complete witango and ported
php site, with forum for support, send me an email to [EMAIL PROTECTED]
with the subject: witango2php
If I get more than about 15-20 responses, I will do it free of
charge, for the community. If I don't receive enough interest, I
will just give you my contact info, and you can approach me one on
one if you need help.
--
Robert Garcia
President - BigHead Technology
VP Application Development - eventpix.com
13653 West Park Dr
Magalia, Ca 95954
ph: 530.645.4040 x222 fax: 530.645.4040
[EMAIL PROTECTED] - [EMAIL PROTECTED]
http://bighead.net/ - http://eventpix.com/
On Jan 28, 2008, at 10:53 AM, Kent Swisher wrote:
Robert
Where can I find this forum?
--
--> Kent Swisher Engineering Tools
--> Alcatel-Lucent Application Support Engineer
--> Wireline Access Products [EMAIL PROTECTED]
--> Petaluma, CA 707-792-7116 (on net 2-855-7116)
On 1/25/2008 3:12 PM, Robert Garcia wrote:
I have built a forum for people to discuss the issues of witango
porting to php, and a place to view code snippets and frameworks
we have built. But its purely a volunteer thing, and so hard to
find the time.
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf