n_offstx(),freemmoffs() - SQL interface

SYNOPSIS

MMOFFS *n_offstx(se,tx,fieldname);
SERVER  *se;
TX      *tx;
char    *fieldname;


DESCRIPTION
This function returns any and all Metamorph subhit offsets for the named field. It returns MMOFFSPN if there are none. See n_fillsrchlst() for a description of the MMOFFS structure, and why there may be no hit information. The returned structure must be freed with freemmoffs() when no longer needed. It is safe to pass MMOFFSPN to freemmoffs().


EXAMPLE

SERVER *se;
TX     *tx;
FLDLST *fl;
MMOFFS *mmo;

   ...
                                                     /* setup query */
   if(n_settx(se,tx,
       "select desc,text from docs where text like 'power struggle';",
       )!=TXPN)
      while((fl=n_gettx(se,tx))!=FLDLSTPN)   /* get next result row */
      {
         mmo=n_offstx(se,tx,"text"); /* get Metamorph info for text */
         dispfields(fl,mmo);/* display the fields, hilighting subhits */
         freemmoffs(mmo);                    /* free Metamorph info */
      }
   ...


Copyright © Thunderstone Software     Last updated: Dec 10 2018
Copyright © 2019 Thunderstone Software LLC. All rights reserved.