Re: [GENERAL] PHP3 and PostgreSQL
От | eschmid |
---|---|
Тема | Re: [GENERAL] PHP3 and PostgreSQL |
Дата | |
Msg-id | Pine.BSF.4.10.10002202159540.76138-100000@mail.s.netic.de обсуждение исходный текст |
Ответ на | PHP3 and PostgreSQL ("sheila bel" <sheilabel@hotmail.com>) |
Список | pgsql-general |
On Sun, 20 Feb 2000, sheila bel wrote: > I'm trying to do the equivalent of the following command of > mysql (inside PHP3 code) in postgreSQL. Oh I see there can help only Oliver Elphick or Paul DuBois. > while (($row = mysql_fetch_object($result))) ..... > > I know there is the pg_fetch_object($result, ?) but I don't > know what to use for ?. I tried 0 and it does an exhaustive > search. I tried using something like $num The function prototype looks right now like: /* {{{ proto object pg_fetch_object(int result, int row) Fetch a row as an object */ > $num=0 > while (($row = mysql_fetch_object($result,$num))) ... > > $num++; While the function prototype in MySQL looks: /* {{{ proto object mysql_fetch_object(int result [, int result_typ]) Fetch a result row as an object */ The optional result_typ is a constant and can be set to MYSQL_ASSOC, MYSQL_NUM, or MYSQL_BOTH. > this is the error message I get : > > Warning: Unable to jump to row 1 on PostgresSQL result index 2 This means, you don't have a second row numbered 1 in result index 2. -Egon PS: If this is misleading, I should read the PHP documentation myself a couple of times. -- Besuchen Sie Six auf der CeBIT (24.2.-1.3.) in Halle 10, Stand 425, und auf der Hannover-Messe (20.-25.3.) in Halle 14, Stand J50!
В списке pgsql-general по дате отправления: