I was wondering if there was a proper way to insert binary data using PHPActiveRecord? Maybe I'm doing it wrong... I experimented with hacking the Connection->query() function to use PDOStatement::bindParam. This way, I could pass in a hex representation, look for the leading '0x' as an indicator and set the bindParam type to binary. How have others dealt with binary data?
public function query($sql, &$values=array())
{ if ($this->logging) $this->logger->log($sql);
$this->last_query = $sql;
try {
if (!($sth = $this->connection->prepare($sql))) throw new DatabaseException($this);
foreach($values as $key => &$value)
{ $paramNum = $key+1;
Subject: Binary Data
Hi,
I was wondering if there was a proper way to insert binary data using PHPActiveRecord? Maybe I'm doing it wrong... I experimented with hacking the Connection->query() function to use PDOStatement::bindParam. This way, I could pass in a hex representation, look for the leading '0x' as an indicator and set the bindParam type to binary. How have others dealt with binary data?