Mysqli converted code
Hi Ray,
I'm struggling with the below conversion code. It looks like this piece of code didn't fully convert.
Any insight on what needs to be changed? I think it's in the while loop.
Original Code:
if($totalRows_Display_Statuses_rs > 0){
do{
$Current_Record=$Current_Record+1;
$delim = ($totalRows_Display_Statuses_rs>$Current_Record)?",":"";
echo '{"displayName":'.__json_encode($row_Display_Statuses_rs['displayName']).',"Status":'.__json_encode($row_Display_Statuses_rs['Status']).'}'.$delim;
}while ($row_Display_Statuses_rs = mysql_fetch_assoc($Display_Statuses_rs));
}else{
}
echo "]";
mysql_free_result($Display_Statuses_rs);
exit();
}
Converted Code:
if($Display_Statuses_rs->TotalRows > 0){
do{
$Current_Record=$Current_Record+1;
$delim = ($Display_Statuses_rs->TotalRows>$Current_Record)?",":"";
echo '{"displayName":'.__json_encode($Display_Statuses_rs->getColumnVal('displayName')).',"Status":'.__json_encode($Display_Statuses_rs->getColumnVal('Status')).'}'.$delim;
}while ($row_Display_Statuses_rs = mysql_fetch_assoc($Display_Statuses_rs));
}else{
}
echo "]";
mysql_free_result($Display_Statuses_rs);
exit();
}