Skip to content

Instantly share code, notes, and snippets.

@medyo
Created June 23, 2015 00:25
Show Gist options
  • Save medyo/40c6a1f5bcc2fbb122ad to your computer and use it in GitHub Desktop.
Save medyo/40c6a1f5bcc2fbb122ad to your computer and use it in GitHub Desktop.
etudiantExistant
public function etudiantExistant($ca,$cin,$cne)
{
$q = $this->db->prepare('SELECT count(*) FROM licence WHERE ca = :ca AND cin = :cin AND cne = :cne ');
$q->bindValue(':ca', $ca);
$q->bindValue(':cin', $cin);
$q->bindValue(':cne', $cne);
$q->execute();
$number_of_rows = $result->fetchColumn();
if ($number_of_rows > 0){
return true;
}else{
return false;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment