1 / 12

แก้ไขข้อมูลที่ไม่สามารถกรอกเป็นภาษาไทยได้ โดยเพิ่มคำสั่งการเลือกชุดภาษาไทย

แก้ไขข้อมูลที่ไม่สามารถกรอกเป็นภาษาไทยได้ โดยเพิ่มคำสั่งการเลือกชุดภาษาไทย. เปิดไฟล์ save_db.php. เพิ่ม code ถัดจาก mysql_select_db (" register",$c ); ดังนี้ mysql_query ("set NAMES tis620");. ทดลองกรอกข้อมูลภาษาไทย จากไฟล์ form.html

hayden
Download Presentation

แก้ไขข้อมูลที่ไม่สามารถกรอกเป็นภาษาไทยได้ โดยเพิ่มคำสั่งการเลือกชุดภาษาไทย

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. แก้ไขข้อมูลที่ไม่สามารถกรอกเป็นภาษาไทยได้แก้ไขข้อมูลที่ไม่สามารถกรอกเป็นภาษาไทยได้ โดยเพิ่มคำสั่งการเลือกชุดภาษาไทย

  2. เปิดไฟล์ save_db.php เพิ่ม code ถัดจาก mysql_select_db("register",$c); ดังนี้ mysql_query("set NAMES tis620");

  3. ทดลองกรอกข้อมูลภาษาไทย จากไฟล์ form.html แล้วดูข้อมูลใน phpMyAdminว่าข้อมูลที่กรอกเป็นภาษาไทย แสดงผลถูกต้องหรือไม่

  4. การใช้คำสั่ง SQL เพื่อ Query ข้อมูลต่างๆ

  5. การเลือกข้อมูลทั้งหมดการเลือกข้อมูลทั้งหมด $sql = "SELECT * from TableName"; $sql = "SELECT * from userinfo"; (download ไฟล์ sql_query.php)

  6. การเรียงลำดับข้อมูล $sql = "SELECT * from TableName order by FieldName"; $sql = "SELECT * from userinfo order by id"; $sql = "SELECT * from userinfo order by id desc"; descหมายถึงเรียงจากมากไปน้อย (descend)

  7. การเลือกข้อมูลบาง field $sql = "SELECT FieldName, FieldName,… from userinfo"; $sql = "SELECT id, username, password from userinfo";

  8. เงื่อนไขสำหรับคำเหมือนเงื่อนไขสำหรับคำเหมือน $sql = "SELECT * from TableName where เงื่อนไข..."; เหมือนทั้งหมด $sql = "SELECT * from userinfo where name = ‘ปริศนา’ "; ไม่เหมือนทั้งหมด $sql = "select *from userinfowhere name !=‘ปริศนา' ";

  9. เหมือนบางส่วน $sql = "SELECT * from userinfo where name LIKE ‘%...%’ "; ยังมีปัญหา run ไม่ได้

  10. แบบผสม $sql = "select *from userinfowhere id<10 and id >3 ";

  11. Assignment ให้รับข้อมูลจากฟอร์ม เช่น ค้นหาจากชื่อ แทนการกรอกชื่อเข้าไปใน code โดยตรง

More Related