[:en]Show List Individual[:th]แสดงสมาชิกระดับบุคคล[:]

[:en][private]

Show Your Individual list

[insert_php]

$servername = “localhost”;
$username = “imaes920_imaes2”;
$password = “dbimaes”;
$current_user = wp_get_current_user()->ID;
// Create connection
$conn = mysql_connect($servername, $username, $password);
mysql_select_db(“imaes920_dbimaes”);

// Check connection
if (!$conn) {
die(“Connection failed: ” . mysql_connect_error());
}
//Select Country ID
$sql = mysql_query (“SELECT `meta_value` FROM `imaesdbusermeta` WHERE `meta_key` = ‘_mgm_cf_id_country’ AND `user_id` = ‘$current_user’ “);
$result = mysql_fetch_assoc($sql);
$country_id = $result[meta_value];

//Select Country Name
$sql_name = mysql_query (“SELECT `name` FROM `imaesdbmgm_countries` WHERE `Code3`= ‘$country_id’”);
$result_name = mysql_fetch_assoc($sql_name);
$country_name = $result_name[name];

echo “

Your Country is : $country_name

“;

echo ‘

“;

[/insert_php]



[/private][:th][private]

แสดงสมาชิกระดับบุคคล

[insert_php]

$servername = "localhost";
$username = "imaes920_imaes2";
$password = "dbimaes";
$current_user = wp_get_current_user()->ID;
// Create connection
$conn = mysql_connect($servername, $username, $password);
mysql_select_db("imaes920_dbimaes");

// Check connection
if (!$conn) {
die("Connection failed: " . mysql_connect_error());
}
//Select Country ID
$sql = mysql_query ("SELECT `meta_value` FROM `imaesdbusermeta` WHERE `meta_key` = '_mgm_cf_id_country' AND `user_id` = '$current_user' ");
$result = mysql_fetch_assoc($sql);
$country_id = $result[meta_value];

//Select Country Name
$sql_name = mysql_query ("SELECT `name` FROM `imaesdbmgm_countries` WHERE `Code3`= '$country_id'");
$result_name = mysql_fetch_assoc($sql_name);
$country_name = $result_name[name];

echo "

ประเทศของคุณคือ : $country_name

";

echo '

";

[/insert_php]


[/private][:]