pike.git / lib / modules / Sql.pmod / sql_util.pmod

version» Context lines:

pike.git/lib/modules/Sql.pmod/sql_util.pmod:1:   /* -  * $Id: sql_util.pmod,v 1.14 2006/08/09 13:04:38 grubba Exp $ +  * $Id: sql_util.pmod,v 1.15 2006/08/11 11:08:44 grubba Exp $    *    * Some SQL utility functions.    * They are kept here to avoid circular references.    *    * Henrik Grubbström 1999-07-01    */      #pike __REAL_VERSION__      //! Some SQL utility functions
pike.git/lib/modules/Sql.pmod/sql_util.pmod:126:    master_result->seek(rows);    }       //! Fetch the next row from the result.    //!    //! All strings in the result are decoded from UTF8.    int|array(string) fetch_row()    {    int|array(string) row = master_result->fetch_row();    if (!arrayp(row)) return row; +  array(int|mapping(string:mixed)) field_info = fetch_fields();    foreach(row; int i; string|int val) { -  if (stringp(val)) { +  if (stringp(val) && field_info[i]->flags && +  !field_info[i]->flags->binary) {    row[i] = utf8_to_string(val);    }    }    return row;    }   }