首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > PHP > 易于使用的PHP类

易于使用的PHP类

  • 资源大小:3.40 kB
  • 上传时间:2021-06-29
  • 下载次数:0次
  • 浏览次数:0次
  • 资源积分:1积分
  • 标      签: php 使用 易于

资 源 简 介

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
VIP VIP
0.178141s