Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.3.x will end 7 October 2024 (12 months).
  • Bug fixes for security issues in 4.3.x will end 21 April 2025 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.2.x is supported too.

Differences Between: [Versions 310 and 403] [Versions 311 and 403] [Versions 39 and 403] [Versions 400 and 403] [Versions 401 and 403]

Library for CSV serialization. This is used by the csv/proxy driver and is the CacheExecute() serialization format.

Copyright: 2000-2013 John Lim
Copyright: 2014 Damien Regad, Mark Newnham and the ADOdb community
License: BSD-3-Clause
License: LGPL-2.1-or-later
File Size: 321 lines (9 kb)
Included or required: 4 times
Referenced: 0 times
Includes or requires: 0 files

Defines 3 functions


Functions that are not part of a class:

_rs2serialize(&$rs,$conn=false,$sql='')   X-Ref
Convert a recordset into special format

param: ADORecordSet  $rs the recordset
param: ADOConnection $conn
param: string        $sql
return: string the CSV formatted data

csv2rs($url, &$err, $timeout=0, $rsclass='ADORecordSet_array')   X-Ref
Open CSV file and convert it into Data.

param: string $url     file/ftp/http url
param: string &$err    returns the error message
param: int $timeout    dispose if recordset has been alive for $timeout secs
param: string $rsclass RecordSet class to return
return: ADORecordSet|false recordset, or false if error occurred.

adodb_write_file($filename, $contents,$debug=false)   X-Ref
Save a file $filename and its $contents (normally for caching) with file locking
Returns true if ok, false if fopen/fwrite error, 0 if rename error (eg. file is locked)