Codeigniter 3: предложение where дает неоднозначную ошибку

return new Card(
      child: new Container(
        padding: EdgeInsets.all(10.0),
        child: new Row(
          mainAxisAlignment: MainAxisAlignment.start,
          children: <Widget>[
            CircleAvatar(
              backgroundColor: Colors.grey,
              backgroundImage: new NetworkImage("${document['Picture']}"),
              radius: 40.0,
            ),
            SizedBox(
              width: 10.0,
            ),
            Column(
              children: <Widget>[
                Text(document['name']),
                Text('subtitle'),
              ],
            )
          ],
        ),
      ),
    );

Вы можете использовать что-то вроде этого.

0
задан Razvan Zamfir 19 January 2019 в 15:22
поделиться

1 ответ

Решил проблему, изменив метод в модели:

public function get_posts_by_author($authorid) {
    $this->db->select('posts.*,categories.name as post_category');
    $this->db->order_by('posts.id', 'DESC');
    $this->db->join('categories', 'posts.cat_id = categories.id', 'inner');
    // the line below was changed
   $query = $this->db->get_where('posts', array('posts.author_id' => $authorid));
    return $query->result();
}
0
ответ дан Razvan Zamfir 19 January 2019 в 15:22
поделиться
Другие вопросы по тегам:

Похожие вопросы: