Modify an ADODB resultset before displaying with rs2html()
Posted: Fri Oct 04, 2002 8:11 pm
OK, I'm doing something a little different now. I'm taking the ADODBrecordset and creating an array from it with the code below:
Now $rs_array is a standard array. Can someone advise me on how I would change some values in that array?
[...previous msg...]
I'm using ADODB to query data from a MSSQL db and then using the ADODB function rs2html() to display the recordset in html format. I would like to change some value in the recordset before displaying it with rs2html(). Not sure what function(s) to use...maybe array_walk()?
Example:
Any help would be appreciated.
Thanks
Code: Select all
$dbconn->Connect($server, $user, $pass, $db);
$sSQL = 'select field1, field2 from table1';
$rs = $dbconn->Execute($sSQL);
$rs_array = $rs->GetArray();[...previous msg...]
I'm using ADODB to query data from a MSSQL db and then using the ADODB function rs2html() to display the recordset in html format. I would like to change some value in the recordset before displaying it with rs2html(). Not sure what function(s) to use...maybe array_walk()?
Example:
Code: Select all
$dbconn->Connect($server, $user, $pass, $db);
$sSQL = 'select field1, field2 from table1';
$rs = $dbconn->Execute($sSQL);
//some code to modify values in the recordset
rs2html($rs, 'border=5', array(field1, field2));Thanks