[phpwebapp-commits] CVS: web_app/database class.MySQLCnn.php,1.9,1.10
Brought to you by:
dashohoxha
From: Dashamir H. <das...@us...> - 2005-07-06 06:13:30
|
Update of /cvsroot/phpwebapp/web_app/database In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19869/database Modified Files: class.MySQLCnn.php Log Message: Index: class.MySQLCnn.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/database/class.MySQLCnn.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** class.MySQLCnn.php 22 Jul 2004 16:25:38 -0000 1.9 --- class.MySQLCnn.php 6 Jul 2005 06:13:16 -0000 1.10 *************** *** 66,76 **** /** Convert the mysql $result to a two-dimentional table. */ function result2table(&$result) ! { ! if (!$result) ! { ! print WebApp::error_msg("Query was not executed successfully."); ! return; ! } ! $arr_result = array(); $i = 0; --- 66,70 ---- /** Convert the mysql $result to a two-dimentional table. */ function result2table(&$result) ! { $arr_result = array(); $i = 0; *************** *** 89,99 **** } ! function show_error($query = "") { if (mysql_errno()==0) return; //no error if (mysql_errno()==1062) return; //ignore this error if (mysql_errno()==1136) return; //ignore this error ! print "Query: '$query' <br /> \n"; ! print mysql_errno().": ".mysql_error()." <br /> \n"; } } --- 83,102 ---- } ! function show_error($query ='') { if (mysql_errno()==0) return; //no error if (mysql_errno()==1062) return; //ignore this error if (mysql_errno()==1136) return; //ignore this error ! ! $err_msg = mysql_errno() . ": " . mysql_error(); ! $err_msg = htmlentities($err_msg); ! $query = htmlentities($query); ! ! print " ! <span class='db_error'> ! <strong>MySQL Error:</strong>$err_msg ! <br/> ! <strong>Query:</strong>$query</span> ! "; } } |