要插入数据,更新数据和删除表,是否需要将现有的sqlite数据库复制到PHP中的:memory:中?
表定义:
CREATE TABLE [appointment] (
_appId integer NOT NULL PRIMARY KEY AUTOINCREMENT
,_id integer NOT NULL
,svc_id integer NOT NULL
,cust_id integer NOT NULL
,person_nm text NOT NULL
,cust_cno integer NOT NULL
,full_add text NOT NULL
,book_dt date NOT NULL
,app_dt date NOT NULL
,app_time time NOT NULL
,service text NOT NULL
,status text NOT NULL
,nxt_dt date
,nxt_time time
,att_dt date
,att_time time
,remark text
);
更新语句为:
UPDATE appointment
SET svc_id='$sid',app_dt='$dt',app_time='$tim',full_add='$add',cust_cno='$cno'
WHERE _appId='$i';
No.您可以直接访问和更改存储在文件中的SQLite数据库。