Skip to content

Instantly share code, notes, and snippets.

View gpongelli's full-sized avatar

Gabriele Pongelli gpongelli

View GitHub Profile
@gpongelli
gpongelli / postgresqlValue.php
Created May 21, 2012 10:22
Modified sqlValue member to address 'character varying', 'timestamp' cases. Fixes docblock and added some break. What's your thought about?
/**
* This function return a field value as a prepared string to be used in a SQL statement.
*
* @param array $columns Array of table's column returned by ::getTableColumns.
* @param string $field_name The table field's name.
* @param string $field_value The variable value to quote and return.
*
* @return string The quoted string.
*
* @since 11.3