PHP MySqli 사용 예제
define("DBUSER", "root"); define("DBPASS", "root"); define("DBNAME", "tlc_db"); define("DBHOST", "localhost"); $conn = new mysqli(DBHOST, DBUSER, DBPASS, DBNAME);if ($conn->connect_error){ trigger_error("Database connection failed :" . $connection->connect_error, E_USER_ERROR);}$sql = "select m_id, m_name, m_sex, m_age, m_phone, m_address from member_table;";$ret = $conn->query($sql);if (false =..
2016. 10. 19.
PHP list 문
list ($family_name, $middle_name, $last_name) = ["Lee", "Middle", "James"]; $MyFamily = [["Lee", "Milddle", "James"],["Kim", "2nd", "Mary"],]; foreach ($MyFamily as list($family_name, $middle_name, $last_name)){echo $family_name.$middle_name.$last_name;}
2016. 10. 3.