fetch(); return $res->fetchColumn($col); } /** * frees sql result resources * @deprecated */ function sql_free_result($res) { if ( !method_exists($res, 'closeCursor') ) return FALSE; return $res->closeCursor(); } /** * returns number of rows in SQL result * @deprecated */ function sql_num_rows($res) { if ( !method_exists($res, 'rowCount') ) return FALSE; return $res->rowCount(); } /** * returns number of rows affected by SQL query * @deprecated */ function sql_affected_rows($conn = false) { global $mysql_affected_row; return $mysql_affected_row; } /** * Get number of fields in result * @deprecated */ function sql_num_fields($res) { if ( !method_exists($res, 'columnCount') ) return FALSE; return $res->columnCount(); } /** * fetches next row of SQL result as an associative array * @deprecated */ function sql_fetch_assoc($res) { if ( !method_exists($res, 'fetch') ) return FALSE; return $res->fetch(PDO::FETCH_ASSOC); } /** * Fetch a result row as an associative array, a numeric array, or both * @deprecated */ function sql_fetch_array($res) { if ( !method_exists($res, 'fetch') ) return FALSE; return $res->fetch(PDO::FETCH_BOTH); } /** * fetches next row of SQL result as an object * @deprecated */ function sql_fetch_object($res) { if ( !method_exists($res, 'fetch') ) return FALSE; return $res->fetch(PDO::FETCH_OBJ); } /** * Get a result row as an enumerated array * @deprecated */ function sql_fetch_row($res) { if ( !method_exists($res, 'fetch') ) return FALSE; return $res->fetch(PDO::FETCH_NUM); } /** * Get column information from a result and return as an object * @deprecated */ function sql_fetch_field($res, $offset = 0) { return FALSE; } /** * Get current system status (returns string) * @deprecated */ function sql_stat($conn = false) { return FALSE; } /** * Returns the name of the character set * @deprecated */ function sql_client_encoding($conn = false) { return FALSE; } /** * Get SQL client version * @deprecated */ function sql_get_client_info() { return DB::getAttribute(PDO::ATTR_CLIENT_VERSION); } /** * Get SQL server version * @deprecated */ function sql_get_server_info($conn = false) { return DB::getAttribute(PDO::ATTR_SERVER_VERSION); } /** * Returns a string describing the type of SQL connection in use for the connection or FALSE on failure * @deprecated */ function sql_get_host_info($conn = false) { return FALSE; } /** * Returns the SQL protocol on success, or FALSE on failure. * @deprecated */ function sql_get_proto_info($conn = false) { return FALSE; } /** * Get the name of the specified field in a result * @deprecated */ function sql_field_name($res, $offset = 0) { if ( !method_exists($res, 'getColumnMeta') ) return FALSE; $column = $res->getColumnMeta($offset); return $column['name']; } /** * Set character encodings in each fields related to MySQL connection. * @deprecated */ function sql_set_charset($charset) { return TRUE; }