Welcome Guest, Not a member yet? Register   Sign In
Error when query mySQL table with JSON column
#1

H all,

I have looked everywhere but not able to find solution for this.

I have a table with JSON column.
id -> int -> 11
jsonStuff -> JSON
createdAt -> int -> 11

When i do simple GET query
$sql = 'SELECT * FROM user_account';
$query = $this->db->query($sql);

All i have was connection timeout error and not able to even have proper error. This only occur WHEN my table has JSON column. What is the proper way to GET the result?

Tried the following also
$this->db->select('*');
$this->db->from('user_account');
$this->db->where(array('id' => $id));
1) $this->db->get();
2) $this->db->get()->result();
3) $this->db->get()->result_array();

None of them works. Please help.
Reply


Messages In This Thread
Error when query mySQL table with JSON column - by garry - 06-03-2018, 01:50 AM



Theme © iAndrew 2016 - Forum software by © MyBB