0

我有一个正在运行的查询

$this->db->select('Parent_Username, Program_Subtype, Is_Chaperone,Participant_name,Role,Percent_completed,Wizard_ID');
$this->db->where('Parent_Username', $username);
$this->db->where('Program_ID', $Program_ID);
$query = $this->db->get($this->child_table);

回声产生:

SELECT `Parent_Username`, `Program_Subtype`, `Is_Chaperone`, `Participant_name`,
`Role`, `Percent_completed`, `Wizard_ID` FROM (`child_table`) 
 WHERE `Parent_Username` = 'test123' AND `Program_ID` = 'abcdef3423' LIMIT 1

那么限制 1来自哪里,当我没有指定它时,我需要所有记录,我可以设置任意限制,$this->db->limit('502340234234235');但为什么我必须这样做,为什么当我没有指定时它限制为 1 条记录它到?

4

0 回答 0