Results 1 to 2 of 2

Thread: เว็ปเป็นไรไม่ทราบใครพอรู้วิธีแก้บาง

  1. #1


    [quote]There appears to be an error with the database.
    You can try to refresh the page by clicking here.

    Error Returned
    [code]mySQL query error: SELECT * FROM ibf_cache_store WHERE cs_key IN (

  2. #2
    Junior Member
    Join Date
    May 2007
    Location
    Thailand
    Posts
    1


    อ่อ เข้าใจแระคับ

    ลองดูที่ SQL Query ดูสิคับ
    จะรู้

    ใช้ตัวเชื่อม in มันใช้แบบนี้คับ

    Code:
    SELECT * FROM `table_name` where `field_name` IN ('ค่าที่ถูกต้องพอดี')
    มันใช้แบบนี้ครับ
    ตัวอย่าง:

    Code:
    SELECT * FROM `student` where `student_name` IN ('สมศักดิ์')
    คือจะดึงข้อมูลนักเรียนที่ชื่อ สมศักดิ์ ทุกๆ คนออกมา สะกดด้วย "สมศักดิ์" เป๊ะๆ คับ

    ถ้าจะดึงของ นร. หลายๆ คนก็
    Code:
    SELECT * FROM `student` where `student_name` IN ('สมชาย', 'สมปอง', 'สมศักดิ์')
    [SIZE=2]ใครช่างใจร้ายใจดำ ทำกับฉันได้ !!![/SIZE]

Members who have read this thread : 0

Actions : (View-Readers)

There are no names to display.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •