Hello Paul
if
exists(!Customer_Info) //Here it doesn't work, error!!!!
Is 'Customer_Info' a constant?
Otherwise I dont see how this works, its not a
function (), its not a variable $..I'm not big on OOPHP some if that is
some sorta construct
ignore my message.
- Ben
ps: These are some wrappers I use to make my code
simpler to look at.
/* DBAS_MySQLConnect $sqlInfo is an array that holds values particular to the app
this is used in.
ex: $sqlInfo = array('databaseUser' => mysql,
'databasePass' => 's3cr3t');
*/
function DBAS_MySQLConnect(&$db, $sqlInfo) { $cIp = $_SERVER["REMOTE_ADDR"]; $dbName = $sqlInfo['databaseUser']; $dbPass = $sqlInfo['databasePass']; $db = mysql_pconnect("", $dbName, $dbPass); if ( $db ) { error_log("DBAS: $cIp connected to mysql server"); } else { error_log("DBAS: error connecting to mysql server"); } } /* DBAS_MySQLUseDB */
function DBAS_MySQLUseDB($dbName, $db) { $res = mysql_select_db($dbName, $db); if ( $res ) { error_log("DBAS: using database $dbName"); } else { error_log("DBAS: cannot use database $dbName"); } } /* DBAS_MySQLQuery
*/
function DBAS_MySQLQuery($query, $db) { $result = mysql_query($query, $db); if ( !$result ) { $errorStr = mysql_error( $db ); $errorNum = mysql_errno( $db ); $errorStr = "error($errorStr):error no($errorNum)"; error_log("DBAS: MySQL $errorStr"); } return $result; }
|
_______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk
NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php