Home > Backend Development > PHP Tutorial > CodeIgniter执行删除作为外键的记录遇到问题

CodeIgniter执行删除作为外键的记录遇到问题

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-06 20:42:00
Original
985 people have browsed it

假设两个表desc如下:
book (isbn PK,authorid int FK)
author (authorid PK,name varchar(10))

现在有两条记录
book 1111, 001
author 001, orz
在未设置的情况下,如果想删除author记录,是不行的。

现在,使用CodeIgniter的AR操作删除,$bool = $this->db->delete(xx,xx);

问题:这句话执行不了,即$bool的返回值一直获得不了,是操作被挂起还是?

回复内容:

假设两个表desc如下:
book (isbn PK,authorid int FK)
author (authorid PK,name varchar(10))

现在有两条记录
book 1111, 001
author 001, orz
在未设置的情况下,如果想删除author记录,是不行的。

现在,使用CodeIgniter的AR操作删除,$bool = $this->db->delete(xx,xx);

问题:这句话执行不了,即$bool的返回值一直获得不了,是操作被挂起还是?

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template