<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body bgcolor="#ffffff" text="#000000">
Hello,
<br>
<br>
I recently upgraded to a newer version of Flash and lost my Remoting
components and could not work with AMFPHP in Flash anymore. Before
searching for the remoting components I thought to try out SWX as an
alternative since it doesn't require these components. But I stumbled
upon a problem when trying to work with a MySQL resultset. In the
Service Explorer the resultset is shown nicely (because it uses AMFPHP
I guess?), but when I test it in Flash the Data Analyzer returns
<br>
<br>
Value = Error 256: Unhandled data type (resource) in
D:\xampp\htdocs\swx\php\SwxAssembler.php, line 145.
<br>
<br>
Do I have to turn my resultset into an array? The code I am trying to
get to work is below. If I could get this to work, I could use my
AMFPHP services without modification in SWX, that would be great.<br>
<br>
Looking forward to your replies.<br>
<br>
Peter<br>
<hr size="2" width="100%"><br>
<b>the SWX Service Method:</b><br>
<blockquote>function getMenu() <br>
{<br>
include_once "connect.php"; // some script to connect to your
database<br>
$sql="SELECT * FROM sometable";<br>
$rs1 = mysql_query($sql);<br>
return $rs1;<br>
}<br>
</blockquote>
<br>
<b>Actionscript:</b><br>
<blockquote>import org.swxformat.SWX;<br>
<br>
var swx:SWX = new SWX();<br>
swx.gateway = <a class="moz-txt-link-rfc2396E" href="http://localhost/swx/php/swx.php">"http://localhost/swx/php/swx.php"</a>;<br>
swx.debug = true;<br>
<br>
var callParameters:Object = <br>
{<br>
serviceClass: "menubar",<br>
method: "getMenu",<br>
result: [this, resultHandler],<br>
args: ""<br>
}<br>
swx.call(callParameters);<br>
<br>
function resultHandler(event:Object) <br>
{<br>
this.myDatagrid.dataProvider = event.result;<br>
}<br>
<br>
</blockquote>
</body>
</html>