| From: | "K Parker" <kparker(at)eudoramail(dot)com> | 
|---|---|
| To: | pgsql-general(at)hub(dot)org | 
| Subject: | Re: PHP and inet data type | 
| Date: | 2000-06-07 18:47:49 | 
| Message-ID: | FEKKPHJCMHADAAAA@shared1-mail.whowhere.com | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-general | 
>> Seems like the cleanest answer would be to
>> teach PHP about inet data
>> type (not to mention other extension types).  
> I'd like to do that, but I don't even know
> where to begin. 
I am currently using 'inet' fields in an
application that uses PHP 3.0.14, and it
works fine, e.g:
select session_ip from acct where session_ip is not null;
  pg_FieldType() says the column is 'inet' and  the results print like this w/o any special effort:
                                                                                      
    10.0.0.3
    10.0.0.4
    10.0.0.54
    10.0.0.158
Updates work just as easily:
    if (! ($update = pg_exec( $conn, 
                "update acct set session_ip = '$REMOTE_ADDR', \
                last_login = 'now'::text where account = $data[0]")))
Join 18 million Eudora users by signing up for a free Eudora Web-Mail account at http://www.eudoramail.com
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andrew Sullivan | 2000-06-07 19:53:51 | Re: Re: PHP and inet data type | 
| Previous Message | Mihai Gheorghiu | 2000-06-07 17:57:25 | Re: Dump |