我正在使用 php (codeigniter),我希望执行此查询
SELECT * FROM families, products WHERE family = "madison"
在这从
$query = $this->db->get_where("families", array("family" => $key));
当我尝试
$query = $this->db->get_where("families", "products" array("family" => $key));
它返回错误。有没有办法做到这一点?
编辑:
发生数据库错误
Error Number: 1054
Unknown column 'products' in 'where clause'
SELECT * FROM (`families`) WHERE `products` IS NULL LIMIT 1
Filename: /Users/Home/Sites/models/family_get.php
Line Number: 5
问题是选择两个表