File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -168,10 +168,15 @@ private function CleanData($data, $type = ''){
168168
169169 // Executes MySQL query
170170 public function executeSQL ($ query ){
171- $ this ->lastQuery = $ query ;
172- if ($ this ->result = mysql_query ($ query , $ this ->databaseLink )){
173- $ this ->records = @mysql_num_rows ($ this ->result );
174- $ this ->affected = @mysql_affected_rows ($ this ->databaseLink );
171+ $ this ->lastQuery = $ query ;
172+ if ($ this ->result = mysql_query ($ query , $ this ->databaseLink )){
173+ if (gettype ($ this ->result ) === 'resource ' ) {
174+ $ this ->records = @mysql_num_rows ($ this ->result );
175+ $ this ->affected = @mysql_affected_rows ($ this ->databaseLink );
176+ } else {
177+ $ this ->records = 0 ;
178+ $ this ->affected = 0 ;
179+ }
175180
176181 if ($ this ->records > 0 ){
177182 $ this ->arrayResults ();
You can’t perform that action at this time.
0 commit comments