[eluser]daniel9201[/eluser]
PHP version 5.2.11
Codeigniter version 1.7.2
i am attempting to put a base64 encoded string into a postgres database column of type text but i am getting a
A Database Error Occurred
Error Number:
ERROR: syntax error at or near "/" LINE 1
error
tried escaping string
Using database binding
$sql = "INSERT INTO list (surname, firstname, title, roletype, dept, team, affiliated, cluster, interests, loc, ext,img) VALUES (?,?,?,?,?,?,?,?,?,?,?,?)";
$q = $this->db->query($sql,array($data['surname'],$data['firstname'],$data['title'],$data['roletype'],$data['dept'],$data['team'],$data['affiliated'],$data['cluster'],$data['interests'],$data['loc'],$data['ext'],$data['img']));
img being the postgres column name
$data['img'] is the string extracted from an xml feed.
Why is codeigniter not allowing me to put base64 encoded string into a postgres database?
can someone put up a link of how this is done with codeigniter.
putting in $this->db->escape_str($data['img']) stops the error but puts nothing in the database
is my only option putting it in as a binary type.