Fix problem with account
This commit is contained in:
parent
5bed44970f
commit
d61b8d86c0
6 changed files with 27 additions and 5 deletions
|
|
@ -121,15 +121,16 @@ 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) {
|
||||
function ExecSql($p_connection, $p_string,$p_exit=true) {
|
||||
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 ) {
|
||||
if ( $ret == false && $p_exit ) {
|
||||
echo_error ("SQL ERROR ::: $p_string");
|
||||
exit(" Operation cancelled due to error : $p_string");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue