Kinderkarneval


Aktuelle Mitstreiter vom Kinderkarneval:

[insert_php]

$idabteilung = 40;

$mysqlhost = “localhost”;
$mysqluser = “db11075507-kg”;
$mysqlpassword = “keinpw”;
$mysqldb = “db11075507-kg”;

$db_link = mysqli_connect (
$mysqlhost,
$mysqluser,
$mysqlpassword,
$mysqldb
);

$sqlvorname = ‘SELECT first_name.usd_value as first_name, last_name.usd_value as last_name, rol_name
FROM adm_roles, adm_categories, adm_members, adm_users
LEFT JOIN adm_user_data as last_name
ON last_name.usd_usr_id = usr_id
AND last_name.usd_usf_id = 1
LEFT JOIN adm_user_data as first_name
ON first_name.usd_usr_id = usr_id
AND first_name.usd_usf_id = 2
WHERE
curdate() between adm_members.mem_begin and adm_members.mem_end
AND rol_cat_id = cat_id
AND ( cat_org_id = “1”
OR cat_org_id IS NULL )
AND mem_rol_id = rol_id
AND mem_usr_id = usr_id
AND usr_valid = 1
AND rol_id=’ . $idabteilung . ‘
ORDER BY first_name.usd_value, first_name.usd_value ASC;’;

if ( ! $sqlResultvorname = @mysqli_query($db_link, $sqlvorname) ) {
echo “Fehler in der Abfrage:\n”. mysqli_error() .”\n”;
}

while ( $sqlArrayvorname = mysqli_fetch_array($sqlResultvorname) )
{

echo utf8_encode($sqlArrayvorname[‘first_name’]) . ‘ ‘ . utf8_encode ($sqlArrayvorname[‘last_name’]);
echo ”
“;

}

[/insert_php]

No Images found.

There are no images.