Projekat

Općenito

Profil

Harbour C Extensions - mysql

fetch row - vrati array:


HB_FUNC( SQLFETCHF ) /* MYSQL_FIELD *mysql_fetch_field(MYSQL_RES *) */
{
   /* NOTE: field structure of MySQL has 8 members as of MySQL 3.22.x */

   PHB_ITEM aField = hb_itemArrayNew( 8 );  <<<<<<<<<<<<<<<<<<<<<<<<<<<< 8 dim array

   MYSQL_FIELD * mfield = mysql_fetch_field( ( MYSQL_RES * ) HB_PARPTR( 1 ) );

   if( mfield )
   {
      hb_arraySetC(  aField, 1, mfield->name );
      hb_arraySetC(  aField, 2, mfield->table );
      hb_arraySetC(  aField, 3, mfield->def );
      hb_arraySetNL( aField, 4, ( long ) mfield->type );
      hb_arraySetNL( aField, 5, mfield->length );
      hb_arraySetNL( aField, 6, mfield->max_length );
      hb_arraySetNL( aField, 7, mfield->flags );
      hb_arraySetNL( aField, 8, mfield->decimals );
   }

   hb_itemReturnRelease( aField );         <<<<<<<<<<<<<<<<<<< vrati tu matricu pa oslobodi memoriju
}