I've searched everywhere and although I've found some close answers here and in the documentation, I'm unable to apply it to them to my situation.
Perhaps someone could be kind enough to help me to convert the following to the adodb way of doing things?
foreach ($rs as $field => $value) {
$$field=stripslashes($value);
}
$rs->Close();
This is my latest attempt,
while (!$rs->EOF) {
for ($i=0, $max=$rs->FieldCount(); $i < $max; $i++){
$$rs->fields($i) = $rs->fields[$i];
}
$rs->MoveNext();
}
The general idea is that $rs should have obtained a single record (due to the WHERE clause only matching one record), containing multiple columns/fields.
I wish to assign each of those fields to a variable of the same name as the field.
I have tried many different configurations and alternatives of the above, including ADODB_FETCH_BOTH ADODB_FETCH_NUM & ADODB_FETCH_ASSOC but still can't get it to work.
This is a similar question but I'm unable to apply it's answer. Much appreciated.