ฟังก์ชั่น mysql_insert_id()
ความหมายของฟังก์ชั่นและการใช้งาน
การคืนค่าข้อมูลของฟิลด์ที่เป็นแบบ auto_increment ของแถวใหม่ที่ได้เพิ่มเข้าไปโดยคำสั่ง INSERT ของ SQL ด้วยฟังก์ชั่น mysql_insert_id()
ฟังก์ชั่น mysql_insert_id()
ความหมายของฟังก์ชั่นและการใช้งาน
การคืนค่าข้อมูลของฟิลด์ที่เป็นแบบ auto_increment ของแถวใหม่ที่ได้เพิ่มเข้าไปโดยคำสั่ง INSERT ของ SQL ด้วยฟังก์ชั่น mysql_insert_id()
เราสามารถอ่านค่า id ล่าสุดจากฐานข้อมูล ได้หลายวิธี ซึ่งแต่ละวิธีก็มีข้อจำกัดแตกต่างกันเล็กน้อยครับ เรามาดูกันว่ามีวิธีใดบ้าง
1.ใช้ฟังก์ชั่น mysql_insert_id() ของ PHP ซี่งฟังก์ชั่นนี้จะคืนค่า id ล่าสุด ที่ทำการ บันทึก หรือ แก้ไข ย้ำว่า บันทึก หรือ แก้ไขนะครับ ถึงจะสามารถคืนค่าออกมาได้ถูกต้อง ฟังก์ชั่นนี้มีข้อเสียเล็กน้อย ตรงที่ เราจะต้องทำการอ่านค่านี้ทันที หลังจากทำการ insert หรือ update เพื่อป้องกันการอัปเดทค่าจากคนอื่น ซึ่งจะทำให้ ค่าที่ได้ไม่ถูกต้อง
The Registrant is the licensee of the domain name – this is the individual or company who has the right to use, sell or destroy a domain name.
The Administrative Contact is the licensee’s appointed agent for the functions above and any other purpose. In the case that the Registrant is a company the Administrative Contact should be an employee, director, manager of the company. This person has full authority for all changes in our system so care should be taken in selecting the appropriate person to nominate for this role.
The Technical Contact is the person responsible for maintaining the DNS nameservers associated with the domain name. This enables that contact to make updates if necessary if, for example, the name of the DNS nameserver changes.
The Billing Contact is the primary point of contact responsible for paying for the domain name’s license renewals.
If someone want to test wpi on windows 10…here what you need to edit:
installer.js from WPIScripts, line 1400, replace with
if (getOSver() == "Win7" || getOSver() == "Win8" || getOSver() == "Win8.1" || getOSver() == "Win10")
core.js, line 583, replace with
if (getOSver() == "XP" || getOSver() == "Vista" || getOSver() == "Win7" || getOSver() == "Win8" || getOSver() == "Win8.1" || getOSver() == "Win10")
wmi.js
line 71, add this
if (Caption.indexOf("10") != -1) { szOSVerCache = "Win10"; szEditionIDCache = getOSsku(OSSKU); }
NOTE: The download links given in this article will always download offline installers for the latest version of Google Chrome.
We all know about Google’s official web browser Google Chrome which has become very popular among all Internet users. It’s very fast and provides several useful features.
When you start downloading Google Chrome on your computer, it downloads a very small 1 MB online installer (also known as stub installer or net installer). When you run the downloaded installer, it again starts downloading the required setup files of Chrome from Google servers as the online installer doesn’t contain all required program files.
โอนทุกสาย (Forward All Call):
– Activate (สมัครใช้บริการ): *21*[เบอร์ปลายทาง]*11#
– Cancel & Retain (ยกเลิกและบันทึกข้อมูลไว้ในระบบ): #21*11#
– Re-establish (สมัครบริการอีกครั้งจากข้อมูลที่บันทึกไว้): *21*11#
– Cancel & Forget (ยกเลิกบริการและลบข้อมูลออกจากระบบ): ##21*11#
– Status(ดูสถานะ): *#21*11#
ตั้งไป +66800000000 แบบนี้ใครโทรเข้ามาก็จะตัดไป “หมายเลขที่ท่านเรียกยังไม่เปิดบริการในระบบ…”
คอนโทรล MSComm
สำหรับการใช้งาน Visual Basic ตั้งแต่เวอร์ชัน 2 เป็นต้นมา ใน Visual Basic จะมีคัสตอมคอนโทรลสำหรับการสื่อสารอนุกรมผ่านทางพอร์ตอนุกรมของคอมพิวเตอร์มาให้ โดยใน Visual Basic เวอร์ชัน 2 และเวอร์ชัน 3 จะใช้ชื่อว่า MSCOMM.VBX ส่วนเวอร์ชัน 4 ใช้ชื่อว่า MSCOMM16.OCX สำหรับการทำงานกับระบบปฏิบัติการ 16 บิตและ MSCOMM32.OCX สำหรับการทำงานกับระบบปฏิบัติการ 32 บิต สำหรับใน Visual Basic เวอร์ชัน 5 จะมีเพียง MSCOMM32.OCX เท่านั้นเพราะถูกออกแบบมาให้ใช้งานกับระบบปฏิบัติการ 32 บิต
MSComm จัดเตรียมทางเลือกเอาไว้ 2 ทางเพื่อความสะดวกในการสื่อสารข้อมูล ทางแรกคือ การสื่อสารข้อมูลที่กระตุ้นด้วยเหตุการณ์ (event-driven communications ) เป็นรูปแบบการใช้งานที่มีประสิทธิภาพมากสำหรับการตอบสนองแบบทันทีทันใด เช่น เมื่อตัวอักษรถูกส่งมาที่พอร์ตอนุกรมหรือเกิดการเปลี่ยนแปลงที่ขา Data Carrier Detect (DCD) หรือขา Request To Send (RTS) เหตุการณ์ ONCOMM ของ MSComm จะสามารถตรวจจับสัญญาณนั้นได้ทันที ซึ่งจะกล่าวถึงรายละเอียดในหัวข้อคุณสมบัติ CommEvent ต่อไป ส่วนทางเลือกที่สองเป็นการคอยตรวจสอบค่าเหตุการณ์และความผิดพลาดที่เกิดขึ้นด้วยการดูค่าที่เปลี่ยนแปลงภายในคุณสมบัติ CommEvent หลังจากให้โปรแกรมทำงานในฟังก์ชั่นต่างๆ ไปเรียบร้อยแล้ว ซึ่งวิธีนี้ใช้งานได้ดีในกรณีที่โปรแกรมมีขนาดเล็ก
คอนโทรล MSComm 1 ตัวสามารถควบคุมการทำงานของพอร์ตอนุกรมได้ 1 พอร์ต ถ้าในโปรแกรมที่ใช้งานต้องการติดต่อกับพอร์ตอนุกรมมากกว่า 1 พอร์ตจะต้องใช้คอนโทรล MSComm มากกว่า 1 ตัวเพื่อควบคุมพอร์ตอนุกรมในแต่ละพอร์ต แอดเดรสของพอร์ตอนุกรมและแอดเดรสของการเกิดอินเตอร์รัปต์สามารถเปลี่ยนแปลงได้จากการแก้ไขค่าที่ Control Panel
ถึงแม้ว่า คอนโทรล MSComm จะมีคุณสมบัติ (property) มากมายหลากหลายตัว แต่สามารถทำความเข้าใจได้ไม่ยากดังนี้
CommPort
ใช้ในการกำหนดและอ่านค่าพอร์ตอนุกรมที่ติดต่ออยู่ (COM1,COM2 ,COM3,COM4)
รูปแบบการใช้งาน
object.CommPort[ = value ]
โดย Value เป็นค่าของพอร์ตอนุกรม ชนิดของข้อมูลเป็น Integer ค่า Value สามารถกำหนดได้ในช่วง 1-16 (ค่าเริ่มต้นกำหนดไว้ที่ 1) เมื่อมีการกำหนดค่าแล้วทำการเปิดพอร์ตโดยใช้คุณสมบัติ PortOpen แต่ว่าพอร์ตนั้นไม่มีอยู่ในระบบ MSCOMM จะสร้างสัญญาณแสดงข้อผิดพลาด error 68 ขึ้นมา ซึ่งหมายถึง อุปกรณ์ตัวนี้ไม่มีอยู่ในระบบ ดังนั้นการเขียนโปรแกรมจึงจำเป็นต้องกำหนดตำแหน่งของพอร์ตอนุกรมก่อนที่ใช้คำสั่ง OpenPort
ตั้งค่าคุณสมบัติต่อไปนี้โดยไม่คำนึงถึงเทคนิคที่คุณใช้:
14400,E,7,1