comparison includes/class.dataaccess.php @ 83:d49afe579884

DataAccess: Passe debugQuery en mysqli aussi
author Franck Deroche <franck@defr.org>
date Thu, 22 Nov 2018 23:13:52 +0100
parents e4e50d4d3b7a
children e37ef9a81737
comparison
equal deleted inserted replaced
82:0a57d5321383 83:d49afe579884
45 return $num_rows; 45 return $num_rows;
46 return 0; 46 return 0;
47 } 47 }
48 48
49 function debugQuery($query, $id=0) { 49 function debugQuery($query, $id=0) {
50 $rv = $this->Query($query, $id); 50 $rv = $this->Query($query, $id);
51 if(mysql_errno() !== 0) 51 if(mysqli_errno($this->link) !== 0)
52 echo("<span class='menu'>\n Query : {$query}<br />\n MySQL Answer : " . mysql_error() . "</span>"); 52 echo("<span class='menu'>\n Query : {$query}<br />\n MySQL Answer : " . mysql_error() . "</span>");
53 return $rv; 53 return $rv;
54 } 54 }
55 55
56 function GetRow($id=0) { 56 function GetRow($id=0) {
57 if(@$row=mysqli_fetch_array($this->results[$id])) { 57 if(@$row=mysqli_fetch_array($this->results[$id])) {
58 return $row; 58 return $row;