pike.git / lib / modules / __builtin.pmod / Sql.pmod / Connection.pike

version» Context lines:

pike.git/lib/modules/__builtin.pmod/Sql.pmod/Connection.pike:404:    else    while (row = res_obj->fetch_row())    res += ({ mkmapping(fieldnames, row) });       // Try the next result.    res_obj = res_obj->next_result && res_obj->next_result();    }    return res;   }    - //! Return last error message. - int|string error() + //! The textual description of the last + //! server-related error. Returns @expr{0@} if no error has occurred + //! yet. It is not cleared upon reading (can be invoked multiple + //! times, will return the same result until a new error occurs). + //! + //! @note + //! The string returned is not newline-terminated. + //! + //! @param clear + //! To clear the error, set it to @expr{1@}. + int|string error(void|int clear)   { -  return "Unknown error"; +  return 0;   }      //! Return last SQLSTATE.   //!   //! The SQLSTATE error codes are specified in ANSI SQL.   string sqlstate()   {    return "IM001"; // "driver does not support this function"   }