Add CA group
This commit is contained in:
parent
9cab18d2b7
commit
c0bbf02727
8 changed files with 172 additions and 62 deletions
|
|
@ -125,20 +125,23 @@ de données");
|
|||
* \brief send a sql string to the database
|
||||
* \param $p_connection db connection
|
||||
* \param $p_string sql string
|
||||
* \param $p_exit if true exits in case of error otherwise returns false
|
||||
* \return false if error otherwise true
|
||||
*/
|
||||
function ExecSql($p_connection, $p_string) {
|
||||
echo_debug('postgres.php',__LINE__,"SQL = $p_string");
|
||||
// probl. with Ubuntu & UTF8
|
||||
//----
|
||||
pg_set_client_encoding($p_connection,'latin1');
|
||||
$ret=pg_query($p_connection,$p_string);
|
||||
if ( $ret == false ) {
|
||||
throw new Exception ("SQL ERROR ::: $p_string",1);
|
||||
}
|
||||
|
||||
pg_set_client_encoding($p_connection,'latin1');
|
||||
ob_start();
|
||||
$ret=pg_query($p_connection,$p_string);
|
||||
if ( ! $ret ) {
|
||||
ob_clean();
|
||||
throw new Exception (" SQL ERROR $p_string ",1);
|
||||
}
|
||||
ob_flush();
|
||||
return $ret;
|
||||
|
||||
}
|
||||
|
||||
/*!
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue