P粉1393512972023-09-03 17:45:51
You can get the ODBC results as an array:
$ODBCcontent = odbc_fetch_array($results);
P粉7576405042023-09-03 14:22:43
It seems that you may be storing status information about the order in different columns. I recommend just using one column with different status numbers.
Maybe:
0 - "Order received" 1 - "Order in preparation" 2 - "Order ready" 3 - "Order dispatched"
You can then use a switch statement in PHP to choose between text options
For example:
echo "<table>"; while($resultrow = odbc_fetch_array($results)) { echo "<tr>"; switch($resultrow['enc_paye']){ case 0: echo "<td>Order received</td>"; break; case 1: echo "<td>Order in preparation</td>"; break; case 2: echo "<td>Order completed</td>"; break; case 3: echo "<td>Order dispatched</td>"; break; default: echo "<td>Unknown</td>"; } // print some other fields in table data fields echo "</tr>"; } echo "</table>";
odbc_result_all
function is deprecated, so ideally you should not use it.
** Edited the following comment by @Adyson **