I do my mysqli prepare, execute, bind and store
then for fetch I do this
I know there must be a more elegant way than to having to name all strings for the cleanData function but I cannot get it to workwhile($row=$stmt->fetch()){
cleanData($ID);
cleanData($artnr);
cleanData($skapadav);
..
.
printf ("%d; %s; %s; %d; %s; %s; %s; %s; %s; %s; %s; %s; %s; %s; %s; %d; %s; %d; %s; %s; %s; %d; %s; %s; %s; %s; %s; %s; %s; %s; %s; %s; %s; %s; %d; %s; %s; %s; %s; %s; %s; %s; %s; %s; %s; %s; %s; %d; %d; %s; %s; %s; %s; %s; %s; %s; %s; %s; \n", $ID, $artnr, $skapadav, ...and so on
}
(Im thinking something like
Code: Select all
while....{
$row = cleanData($row);
printf (...
}Code: Select all
while bla bla fetch_row($result) {
$result=cleanData($result);
printf...
}Thanks in advance