salve avrei questo problema , sto modificando le query utilizzando una classe per il database,, adesso ho una funzione per la ricerca degli utenti , che stampa errore perche? cosa sbaglio?
Codice PHP:
function ShearchStaff($staffsearch){
global $dbcore;
if($dbcore->getnumrows("select t.* , gs.id_groups ,gs.nome_group from tech as t left join grouptech as gs on t.groupid = gs.id_groups
where t. nome LIKE '%".addslashes($staffsearch)."%' or
t. cognome LIKE '%".addslashes($staffsearch)."%' or
t. username LIKE '%".addslashes($staffsearch)."%' or
t. email LIKE '%".addslashes($staffsearch)."%' order by t.staffid asc ")== 0){
return false;
}
$result = $dbcore->getlist("select t.* , gs.id_groups ,gs.nome_group from tech as t left join grouptech as gs on t.groupid = gs.id_groups
where t. nome LIKE '%".addslashes($staffsearch)."%' or
t. cognome LIKE '%".addslashes($staffsearch)."%' or
t. username LIKE '%".addslashes($staffsearch)."%' or
t. email LIKE '%".addslashes($staffsearch)."%' order by t.staffid asc ");
return $result;
}
questa e la funzione
Codice PHP:
function getnumrows($sql) {
$result = $this->query($sql);
$num = mysql_num_rows($result);
@mysql_free_result($result);
return $num;
}