// Edit all selected country codes
$OUT = ""; $SW = 2;
- foreach ($_POST['id'] as $id=>$status)
+ foreach ($_POST['id'] as $id => $status)
{
// Load data from DB
- $result = SQL_QUERY_ESC("SELECT code, descr FROM "._MYSQL_PREFIX."_countries WHERE id=%d LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT code, descr FROM "._MYSQL_PREFIX."_countries WHERE id=%s LIMIT 1",
array(bigintval($id)), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1)
{
if ((isset($_POST['modify'])) && (!empty($_POST['id'])))
{
// Modify
- foreach ($_POST['id'] as $id=>$sel)
+ foreach ($_POST['id'] as $id => $sel)
{
$SQLs[] = "UPDATE "._MYSQL_PREFIX."_countries SET code='".$_POST['code'][$id]."', descr='".$_POST['descr'][$id]."', is_active='".$_POST['is_active'][$id]."' WHERE id='".$id."' LIMIT 1";
}