function updatePassword($p, $id) { $id = intval($id); $p = convert2DB($p); $sql = "UPDATE users \n SET user_password = MD5('{$p}') \n WHERE user_id = {$id};\n "; return ExecRequete($sql); }
function updateCategorie($pTitre, $id) { $id = intval($id); $pTitre = convert2DB($pTitre); $sql = "\n\t\t\tUPDATE categories\n\t\t\tSET categorie_titre = ' {$pTitre} '\n\t\t\tWHERE categorie_id = {$id};\n\t "; return ExecRequete($sql); }
function updateRessources($sc_id, $r_tt, $r_url_h, $r_url_t, $r_img_a, $id) { $id = intval($id); $sc_id = convert2DB($sc_id); $r_tt = convert2DB($r_tt); $r_url_h = convert2DB($r_url_h); $r_url_t = convert2DB($r_url_t); $r_img_a = convert2DB($r_img_a); $sql = "\n\t\t\tUPDATE ressources\n\t\t\tSET sous_categ_id = {$sc_id},\n\t\t\tSET ressource_titre = {$r_tt},\n\t\t\tSET ressource_url_href = {$r_url_h},\n\t\t\tSET ressource_url_title = {$r_url_t},\n\t\t\tSET ressource_img_alt = {$r_img_a},\n\t\t\tWHERE ressource_id = {$id};\n\t "; var_dump($sql); return ExecRequete($sql); }