Conversion Required For POSTGRESQL - bytea conversion
Ran select encode (value, 'escape') from calculation_cache_transaction on my database and I need to get the information back into the database via php. This is what came out below and this is how it needs to appear in the database.
"\200 }q (U calculateTaxesByIDq }q UtotalPriceEx()q \205q }q K cdecimal
Decimal
q U 33.54\205Rq ssU totalPriceInq }q
Nh U 225.31\205Rq sU totalPriceExq }q
Nh U 191.77\205Rq sU totalTaxq }q Nh U 33.54\205Rq su."
When I run it though I get invalid byte sequence
Final code output needs to be along the lines of
Insert into calculation_cache_transaction (id, id_transaction, dictionary) VALUES ($calculationId, $transactionId, E'THE CODE FROM ABOVE');
Fairly simple, let me know if you can do it!