In order to pass recordset data back to flash in AMFPHP a recordset filter needs to be created. AMFPHP comes with several filters by default, but does not include one for SQLITE.
I've modified the MYSQL filter to act as the SQLITE filter. So far it seems to be working. :)
If anyone else want this. Create a file named "sqliteRecordSet.php" and place it within "flash services\sql" and use this code:
<?php<br>// Modified mysqlRecordSet.php by changing the relevant<br>// lines to work with an SQLite database - AS<br><br>// original section of writeRecordSet method JC<br>// this makes it easy for developers edit results<br>// with touching the more important parts of the PHP Gateway JC<br>// maybe use different methods to format recordset<br>// different ways depending on something??? JC<br><br>class sqliteRecordSet<br>{<br> var $initialData = array();<br> var $columnNames = array();<br><br> function sqliteRecordSet($d)<br> {<br> // grab all of the rows<br> while ($line = sqlite_fetch_array($d, SQLITE_NUM)) {<br> // decode each value ready for encoding when it goes through serialization<br> foreach($line as $key => $value) {<br> $line[$key] = utf8_decode($value);<br> }<br> // add each row to the initial data array<br> $this->initialData[] = $line;<br> } <br> // grab the number of fields<br> $fieldcount = sqlite_num_fields($d);<br> // loop over all of the fields<br> for($i=0; $i<$fieldcount; $i++) {<br> // decode each field name ready for encoding when it goes through serialization<br> // and save each field name into the array<br> $this->columnNames[$i] = utf8_decode(sqlite_field_name($d, $i));<br> }<br> $this->numRows = sqlite_num_rows($d);<br> }<br>}<br>?>