note 14439 deleted from function.pg-exec by nlopess

From: Date: Sat, 26 Jun 2004 19:17:36 +0000
Subject: note 14439 deleted from function.pg-exec by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-71817@lists.php.net to get a copy of this message
Note Submitter: rvtol@isolution.nl ---- Another update: function sql_exec(&$resDB, &$strSQL) { ..if (1) ..{ ....ob_start(); // output buffer ....$r = pg_exec($resDB,$strSQL); ....if (($ob_len = ob_get_length()) > 0) $ob_val = ob_get_contents(); ....ob_end_clean(); ....if ($ob_len > 0) ....{ ......if (1) ........$ob_val = ereg_replace( ':[ ]+', ':\n', ereg_replace("\n|[<][/]?[A-Za-z]+[>]", '', AddSlashes($ob_val))); ......else ........$ob_val = str_replace( "\n", ' ', AddSlashes(pg_ErrorMessage()) ); ......elnx('<SCRIPT LANGUAGE="JavaScript">', '<!--', ' window.alert("' . $ob_val . '")', '//-->', '</SCRIPT>'); ....} ..} ..else ..{ ....$r = pg_exec($resDB, $strSQL); ..} ..return $r; } Change the 1st 'if (1)' to 'if (0)' for normal pg_exec(). Change the 2nd 'if (1)' to 'if (0)' for a more user-friendly message. Ruud

« previous php.notes (#71817) next »