|
 |
|
สอบถามแนวทางการทำรบกวนท่านผู้รู้สละเวลาเพื่อเป็นวิทยทานด้วยนะครับขอบคุณครับ |
|
 |
|
|
 |
 |
|
คืออยากจะถามเพื่อจะได้รู้ว่าจะต้องหา ตัวอย่างโค้ดประมาณไหนอะครับ
1.ต้องการดึงค่าจาก db มาคำนวน คือคิดสูตรออกแล้วแต่ไม่รู้ว่าจะนำมาใช้อย่างไร ต้องเอาไปทำเป็น ฟักค์ชั่น ??
แล้วแต่ครับจะทำเป็น function หรือไม่ก็ได้ ถ้าใช้ครั้งเดียวก็ไม่ต้องเสียเวลาเปล่า
การคำนวณอาจจะต้องใช้หลายคำสั่งประกอบเข้าด้วยกัน ไม่ได้จบแค่บรรทัดเดียวครับ ศึกษาวิธีการเขียนพื้นฐานแล้วจะทราบเองครับ
2.เมื่อได้ค่าจากการคำนวนแล้วจะนำไปออกเอกสารเช่นได้ค่ามา A,B,C เอกสารไฟล์จำพวก word PDF เป้นต้น จะแทรกค่าลงไปอย่างไรเช่นมี เอกสารที่เว้นช่องไว้เพื่อรับค่า A,B,C มาใส่เช่น ใบสั่งซื้อเลขที่...A....ชื่อร้านค้า.....B......ราคารวม.....C...... จะสามารถทำได้ไหมครับ อย่างไรครับ
สามารถทำได้แต่ไม่สะดวก วิธีปกติคือสร้างเอกสาร pdf หรือ word ขึ้นมาใหม่ด้วย php ทั้งไฟล์เลย
3.ให้การ INSERT EDIT UPDATE DELETE นั้น ถ้าเราจะเซ็ตค่าแบบว่าถ้าไม่ก็ปุ่ม EDIT จะได้โชว์ ปุ่ม SAVE/UPDATE จะทำอย่างไร ??
:) ก็เช็คตัวแปรหรือค่าใน db ครับ แล้วแต่ครับ ...สรุปแล้วหมายถึงอะไร?
4.การ delete ถ้าจะทำแบบกดแล้วแค่เปลี่ยนสีทั้งแถวให้เปงสีเทาและไม่สามารถทำการใดใดกับแถวนั้นได้แต่ข้อมูลไม่ได้ถูกลบออกไปจาก db จะทำอย่างไรครับ
ปกติก็ให้ตั้ง column นึงของ databse table ชื่อ status 0 = ลบแล้ว, 1 = ปกติ
แล้วเวลาแสดงข้อมูลรายการก็เช็คว่าค่า status เป็นอย่างไรก็แสดงตามนั้นครับ
อันนี้ไม่เกี่ยวแต่เกี่ยวกับลบเหมือนกัน 
http://web-programming-bookmark.blogspot.com/2011/01/delete-record-confirmation-by-num.html
|
 |
 |
 |
 |
Date :
2011-11-29 23:13:30 |
By :
num |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 00
|