ajout db_num_rows()

This commit is contained in:
jbousquie 2016-12-01 10:23:20 +01:00
parent 5b0ded030e
commit a0a6b857f5

View File

@ -28,11 +28,18 @@ function db_fetch_column_names(&$res) {
$fields = $res->fetch_fields();
$col_names = array();
foreach($fields as $col) {
$col_names[] = $fields->name;
$col_names[] = $col->name;
}
return $col_names;
}
// Fonction : db_num_rows()
// Renvoie le nombre de ligne d'un résultat
function db_num_rows(&$res) {
$num = $res->num_rows;
return $num;
}
// Fonction db_escape_string
// Retourne ûne chaîne échappée
function db_escape_string(&$db, $string) {