pike.git
/
lib
/
modules
/
Sql.pmod
/
sql_util.pmod
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/lib/modules/Sql.pmod/sql_util.pmod:1:
/*
-
* $Id: sql_util.pmod,v 1.
17
2007
/
05
/
03
13
:
57
:
35
mast
Exp $
+
* $Id: sql_util.pmod,v 1.
18
2009
/
08
/
26
12
:
38
:
55
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:131:
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)) { row[i] = utf8_to_string(val); } } return row; }
+
+
//! JSON is always utf8 default, do nothing.
+
int|string fetch_json_result()
+
{
+
return master_result->fetch_json_result();
}
-
+
}
#if constant (Mysql.mysql.HAVE_MYSQL_FIELD_CHARSETNR) class MySQLUnicodeWrapper //! Result wrapper for MySQL that performs UTF-8 decoding of all //! nonbinary fields. Useful if the result charset of the connection //! has been set to UTF-8. //! //! @note //! There's normally no need to use this class directly. It's used