资 源 简 介
I have written a php class for accessing MySql. The class is very easy to use (and very intuitive).
This is how to insert a new record
```
$db = new db();
$db->table = "employee" // set table name
$db->field["name"] = "tanin"; // set the field "name"
$db->field["lastname"] = na nakorn";
$db->field["employee_id"] = "283581";
$new_id = $db->insert(); // do the insert transaction, the function return the primary key of the new record
```
This is how to update a record
```
$db = new db();
$db->table = "employee" // set table name
$db->field["name"] = "tanin"; // set the field "name"
$db->field["lastname"] = na nakorn";
$db->where["employee_id"] = "283581"; // set the where clause of sql
$num_rows = $db->update(); // do the update trans