แจกเผื่อใครอยากใช้ อยากเอาไปปรับใช้ หรือเอาไว้เป็นแนวทาง Class Connect Database แบบ mysqli
http://www.thaicreate.com/php/forum/123485.html#ในคลาสประกอบด้วย#
SelectAll()
SelectOne()
Insert()
Update()
Delete()
ตัวอย่าง วิธีใช้งานการ Select แบบทั้งหมด$result = $db->SelectAll('table',array('เงื่อนไข'=>'xxxx'));
การ insert$db->Insert('table',array('ข้อมูล'=>'xxxx'));
หรือ
$data['field'] = 'ก';
$data['field2'] = 'ข';
$db->Insert('table',$data);
การอัพเดท$db->Update('table',array('ข้อมูล'=>'xxxx'),array('code'=>xxx));
ที่มา :
http://www.thaicreate.com/php/forum/123485.html