Re: [GENERAL] Porting Code to Postgresql

2003-10-15 Thread Richard Welty
On Wed, 15 Oct 2003 08:43:07 -0700 Dennis Gearon <[EMAIL PROTECTED]> wrote: > >$count = pg_numrows( $result); > >for( $i = 0; $i < $count; $i++){ ... > in case of no rows, maybe do: > > $count = pg_numrows( $result); > while ( 0 < $result ){ ... shouldn't make a difference; in php, the condition

Re: [GENERAL] Porting Code to Postgresql

2003-10-15 Thread Rick Gigger
I would guess most likely not. There are a few mysql features that postgres doesn't have (for example mysql_insert_id) but there are still ways to do them in postgers. I doubt it will be very hard. - Original Message - From: "Errol Neal" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent:

Re: [GENERAL] Porting Code to Postgresql

2003-10-15 Thread scott.marlowe
On Wed, 15 Oct 2003, Dennis Gearon wrote: > > >$count = pg_numrows( $result); > >for( $i = 0; $i < $count; $i++){ > >$row = pg_fetch_object( $result, $row); > >... > >} > > > >if you want it to work. > > > > > > > in case of no rows, maybe do: > > $count = pg_numrows( $result); > while

Re: [GENERAL] Porting Code to Postgresql

2003-10-15 Thread Rick Gigger
L PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, October 15, 2003 1:04 PM Subject: Re: [GENERAL] Porting Code to Postgresql > On Wed, Oct 15, 2003 at 12:44:55PM -0600, scott.marlowe wrote: > > > All the rest if pretty straight forward hacking, having converted or > > he

Re: [GENERAL] Porting Code to Postgresql

2003-10-15 Thread Alvaro Herrera
On Wed, Oct 15, 2003 at 12:44:55PM -0600, scott.marlowe wrote: > All the rest if pretty straight forward hacking, having converted or > helped to convert a few other MySQL tools to Postgresql recently. Of course, to get maximum performance you should drop the MySQL support and instead of coding

Re: [GENERAL] Porting Code to Postgresql

2003-10-15 Thread scott.marlowe
On Wed, 15 Oct 2003, Errol Neal wrote: > Hi all, > > Not sure if this is a question for a php list or this one, but I'll give it > a shot and > if I am wrong, please do not crucify me. :-) > > There is a php based sourceforge project called mailwatch. > (http://www.sourceforge.net/projects/mai

Re: [GENERAL] Porting Code to Postgresql

2003-10-15 Thread Dennis Gearon
$count = pg_numrows( $result); for( $i = 0; $i < $count; $i++){ $row = pg_fetch_object( $result, $row); ... } if you want it to work. in case of no rows, maybe do: $count = pg_numrows( $result); while ( 0 < $result ){ $result--; $row = pg_fetch_object( $result, $row); ... } or $

Re: [GENERAL] Porting Code to Postgresql

2003-10-15 Thread Ryan Mahoney
If the code is hard coded to use the built in mysql function calls, you can replace them with postgresql calls or add a layer of database abstraction. Once you dump the schema into postgres and make whatever datatype etc, changes that need to be made you should be able to test the application by r

Re: [GENERAL] Porting Code to Postgresql

2003-10-15 Thread Richard Welty
On Wed, 15 Oct 2003 10:16:29 -0400 Errol Neal <[EMAIL PROTECTED]> wrote: > There is a php based sourceforge project called mailwatch. > (http://www.sourceforge.net/projects/mailwatch) It logs data from the excellent > Mailscanner security product into a mysql database. Now, I am not a php > progr