database query in order_total-module not working
Posted: Wed Aug 20, 2025 9:17 am
Hello,
i want to add the following database query to the function process in e.g. ot_shipping.php (includes/modules/order_total):
......
$lese_ab = $db->query(sprintf(<<<'EOSQL'
SELECT countries_iso_code_2 FROM countries WHERE countries_id = %d
EOSQL
, $order->billing['country_id']));
IF ($y_erg_ab = $lese_ab->fetch_assoc())
{
$y_iso = $y_erg_ab['countries_iso_code_2'];
}
.......
If i try the select in the database manually, there is one entry for countries_id=81.
If i run it in phoenix (page checkout_confirmation.php), the query does not work, and the checkout-page ist white and only shows "500 Internal Server Error".
What is the mistake ?
PHP Version : 7.4.33 (Zend 3.4.0), Phoenix: v1.0.9.7
best regards
Anke
i want to add the following database query to the function process in e.g. ot_shipping.php (includes/modules/order_total):
......
$lese_ab = $db->query(sprintf(<<<'EOSQL'
SELECT countries_iso_code_2 FROM countries WHERE countries_id = %d
EOSQL
, $order->billing['country_id']));
IF ($y_erg_ab = $lese_ab->fetch_assoc())
{
$y_iso = $y_erg_ab['countries_iso_code_2'];
}
.......
If i try the select in the database manually, there is one entry for countries_id=81.
If i run it in phoenix (page checkout_confirmation.php), the query does not work, and the checkout-page ist white and only shows "500 Internal Server Error".
What is the mistake ?
PHP Version : 7.4.33 (Zend 3.4.0), Phoenix: v1.0.9.7
best regards
Anke