mirror of
https://github.com/EQMacEmu/magelo
synced 2026-08-21 00:26:05 -04:00
17 lines
375 B
PHP
17 lines
375 B
PHP
<?php
|
|
function fetchRows($result) {
|
|
$res = array();
|
|
if ( $result ) {
|
|
while ( $record = mysqli_fetch_assoc($result) ){
|
|
$res[] = $record;
|
|
}
|
|
}
|
|
return $res;
|
|
}
|
|
function numRows($result) {
|
|
return mysqli_num_rows($result);
|
|
}
|
|
function sanitize($mydb, $val) {
|
|
$val = mysqli_real_escape_string($mydb, trim($val));
|
|
return $val;
|
|
}
|