Este es el código inicial
Código PHP:
Ver original
//Mostrar bd $query = "SELECT * FROM ds_customer"; $result = $mysqli->query($query); //funcion echo("<table>"); while ($rows = $result->fetch_assoc()) { print("<td>".$rows["custom_field"]."</td>"." "); print("<td>".$rows["firstname"]."</td>"." "); print("<td>".$rows["lastname"]."</td>"." "); print("</tr>"); } //suma $query2 = "SELECT * FROM ds_customer_reward"; $result2 = $mysqli->query($query2); if (!$result2) { throw new Exception("Database Error [{$mysqli->errno}] {$mysqli->error}"); } while ($rows2 = $result2->fetch_assoc()) { print("<td>".$rows2["points"]."</td>"." "); } print("</table>"); /* liberar la serie de resultados */ $result->free();