I have multiple records, shown in the picture below, i want to list down all records where the owner is Ghost_Ge My code is: PHP: $target = "Ghost_Ge"$chests = $db->query("SELECT * FROM chests WHERE owner = \"$target\"")->fetchArray(SQLITE3_ASSOC);vardump($chest); however, the output only shows the first record: Code: array(7) { ["id"]=> int(960) ["owner"]=> string(8) "Ghost_Ge" ["x"]=> int(138) ["y"]=> int(70) ["z"]=> int(148) ["attribute"]=> int(0) ["passcode"]=> string(0) "" } Am i doing something wrong? Any help would be apprecited
fetchArray only returns one row. You need to save the result of $db->query(), and fetchArray on it until fetchArray returns false (hint: use a while loop).