1
1
<?php
2
+ /*
3
+ * Copyright (C) 2011
4
+ * Ed Rackham (http://github.com/a1phanumeric/PHP-MySQL-Class)
5
+ *
6
+ * This program is free software: you can redistribute it and/or modify
7
+ * it under the terms of the GNU General Public License as published by
8
+ * the Free Software Foundation, either version 3 of the License, or
9
+ * (at your option) any later version.
10
+ *
11
+ * This program is distributed in the hope that it will be useful,
12
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ * GNU General Public License for more details.
15
+ *
16
+ * You should have received a copy of the GNU General Public License
17
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18
+ */
19
+
2
20
// MySQL Class
3
21
class MySQL {
4
22
// Base variables
@@ -229,6 +247,15 @@ function ArrayResult(){
229
247
$ this ->aArrayedResult = mysql_fetch_assoc ($ this ->aResult ) or die (mysql_error ());
230
248
return $ this ->aArrayedResult ;
231
249
}
250
+
251
+ // 'Arrays' multiple result
252
+ function ArrayResults (){
253
+ $ this ->aArrayedResults = array ();
254
+ for ($ i = 0 ; $ aData = mysql_fetch_assoc ($ this ->aResult ); $ i ++){
255
+ $ this ->aArrayedResults [] = $ aData ;
256
+ }
257
+ return $ this ->aArrayedResults ;
258
+ }
232
259
233
260
// 'Arrays' multiple results with a key
234
261
function ArrayResultsWithKey ($ sKey ='id ' ){
@@ -258,4 +285,5 @@ function SecureData($aData){
258
285
return $ aData ;
259
286
}
260
287
}
261
- ?>
288
+ ?>
289
+
0 commit comments