Ir al contenido principal.
Enlaces relacionados:  Prensa  Compañía  Clientes  Contáctenos
Solsoft

Foros

getting terms by a range .... ?


Autor Mensaje
Escrito en: 16. 05. 2005 [14:34]
orkcu@yahoo.com
Peña
Autor del tema
registrado desde: 31.12.1969
Entradas: 0
--0-414628225-1116268491=:86061
Content-Type: text/plain; charset=us-ascii
Content-Id:
Content-Disposition: inline

Hi people

here is a modification of the function isis_terms, but
in this case the user can suply a "from" and a "count"
value so they can a subset of terms

the main use of this is to avoid the php limits when
you have a lots of terms


I will send it to the list because maybe others than
Braulio (you promess you will see it icon_smile.gif ), are
interested in test it

cu
roger



__________________________________
Yahoo! Mail Mobile
Take Yahoo! Mail with you! Check email on your mobile phone.
http://mobile.yahoo.com/learn/mail
--0-414628225-1116268491=:86061
Content-Type: text/x-patch; name="php-openisis-1.0.3p3.patch"
Content-Description: 3555706347-php-openisis-1.0.3p3.patch
Content-Disposition: inline; filename="php-openisis-1.0.3p3.patch"

--- isis-1.0.3p3/isis.c-ori 2004-08-20 16:53:20.000000000 +0000
+++ isis-1.0.3p3/isis.c 2005-03-18 03:15:52.000000000 +0000
@@ -59,6 +59,7 @@
ZEND_FE(isis_search, NULL)
ZEND_FE(isis_query, NULL)
ZEND_FE(isis_terms, NULL)
+ ZEND_FE(isis_terms_by_range, NULL)
ZEND_FE(isis_fetch_array, NULL)
ZEND_FE(isis_fetch_flat_array, NULL)
ZEND_FE(isis_fetch_flat_array_from_mfn, NULL)
@@ -485,6 +486,60 @@
}
/* }}} */

+/* {{{ proto array isis_terms_by_range(string term, resource isis_dbid, start,
+ * count )
+ Return terms matching term (e.g. plant$) over an isis database */
+ZEND_FUNCTION(isis_terms_by_range)
+{
+ char *term=NULL;
+ zval *z_dbid;
+ isis_dbid *dbid;
+ int i;
+ int c;
+ int s_len;
+ long start;
+ long count;
+ int stop;
+ union { OpenIsisRec set; char buf[10000]; } result;
+
+ switch(ZEND_NUM_ARGS())
+ {
+ case 4:
+ if (zend_parse_parameters(4 TSRMLS_CC, "llsr", &start, &count, &term, &s_len, &z_dbid)==FAILURE)
+ {
+ RETURN_FALSE;
+ }
+ ZEND_FETCH_RESOURCE(dbid, isis_dbid *, &z_dbid, -1, "Isis dbid", le_isis_dbid);
+ break;
+ default:
+ WRONG_PARAM_COUNT;
+ RETURN_FALSE;
+ }
+
+ if(array_init(return_value) != SUCCESS)
+ {
+ zend_error(E_WARNING, "I can't successfuly init the array!");
+ RETURN_FALSE;
+ }
+
+ result.set.len = 0;
+ result.set.bytes = sizeof(result);
+ while ( NULL != openIsisTerm(&(result.set), dbid->id, term) && result.set.len )
+ {
+ for (i=start; i < result.set.len; i++ )
+ {
+ if (add_next_index_stringl(return_value, result.set.field[i].val, result.set.field[i].len, 1) == FAILURE)
+ {
+ zend_error(E_WARNING, "I can't successfuly complete the array!");
+ RETURN_FALSE;
+ };
+ if ( i >= start + count ) return;
+ }
+ }
+
+}
+/* }}} */
+
/* {{{ proto array isis_fetch_array(resource isis_result)
Return an array with result information (mfn and tags) */
ZEND_FUNCTION(isis_fetch_array)

--0-414628225-1116268491=:86061--

------------------------------------------
Posted to Phorum via PhorumMail
Escrito en: 18. 05. 2005 [10:09]
orkcu@yahoo.com
Peña
Autor del tema
registrado desde: 31.12.1969
Entradas: 0
--- Roger Peña Escobio <orkcu@yahoo.com> wrote:

> Hi people
>
> here is a modification of the function isis_terms,
> but
> in this case the user can suply a "from" and a
> "count"
> value so they can a subset of terms
>
> the main use of this is to avoid the php limits when
> you have a lots of terms
>
>
> I will send it to the list because maybe others than
> Braulio (you promess you will see it icon_smile.gif ), are
> interested in test it
>

Any comments ?

Braulio, is it ok to include this function into the
main tree?

I am just starting the php-openisis part in the
workshop and it would be nice if you (all members of
this list) can give suggestions or fix to the lessons.
this is the wiki:
http://seminar.aki-stuttgart.de/cgi-bin/isis/wiki.pl/Lessons

ganar adeptos al PHP-Openisis depende de cada uno de
nostros, si entre todos podemos contribuir a hacer un
mejor workshop estoy seguro que el futuro de
php-openisis sera mejor icon_smile.gif

saludos
roger




Discover Yahoo!
Use Yahoo! to plan a weekend, have fun online and more. Check it out!
http://discover.yahoo.com/

------------------------------------------
Posted to Phorum via PhorumMail
Escrito en: 18. 05. 2005 [10:20]
paul@malete.org
Klaus Ripke
registrado desde: 31.12.1969
Entradas: 0
On Wed, May 18, 2005 at 07:09:18AM -0700, Roger Pe=F1a wrote:
> ganar adeptos al PHP-Openisis depende de cada uno de
> nostros, si entre todos podemos contribuir a hacer un
> mejor workshop estoy seguro que el futuro de
> php-openisis sera mejor icon_smile.gif

claro, con linux icon_smile.gif
http://www.jrebelde.cubaweb.cu/2005/abril-junio/mayo-17/impulsara.html

hasta la victoria siempre

------------------------------------------
Posted to Phorum via PhorumMail



¿Ha olvidado su contraseña?

Por favor introduzca su nombre de usuario o dirección de correo electrónico. Las instrucciones para restablecer la contraseña serán inmediatamente enviadas por correo electrónico.
Restablecer contraseña

Volver al formulario de inicio de sesión 


Copyright © 2003-2009, Solsoft de Costa Rica S.A.
Declaración de privacidad