int8 and PHP problems

From: "Seader, Cameron" <CSeader(at)idahopower(dot)com>
To: pgsql-php(at)postgresql(dot)org
Subject: int8 and PHP problems
Date: 2003-12-19 14:42:55
Message-ID: 71B8A8BEC516CF46835CA629156CF21163F6CA@bedford.idacorp.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php

I have a database with two int8 fields that don't seem to be working properly. I want it too be able to store the values of 0x000000000002, but it won't. MySQL seems too. Strange. PHP does not handle 64 bit integers so that will not work either. How can i deal with this kind of value useing PHP and PostgreSQL.
One Reply i had made sense, but not sure how to do it.

You are apparently trying to insert a hex string "0x000000000002"
>(notice it starts with '0x') into an int8 field -- don't do that.
>Convert the hex to integer before inserting, or cast it, like so:
>regression=# select x'000000000002'::int8;

How do you do the above casting as explained before inserting, or how do you convert it to an integer when PHP will not handle the 64 bit integers at all.

Can someone please help on this?
Thanks,

Cameron Seader
Operations Center Technician II
CSeader(at)Idahopower(dot)com
1.208.388.2582 Office

[INFO] -- Access Manager:
This transmission may contain information that is privileged, confidential and/or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is STRICTLY PROHIBITED. If you received this transmission in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format. Thank you. A2

Browse pgsql-php by date

  From Date Subject
Next Message ljb 2003-12-20 02:24:34 How to cancel a query when user stops a page load
Previous Message Sai Hertz And Control Systems 2003-12-19 04:46:47 Data Representation