Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function getCustomers($from=0, $records=0, $genderId=0){
- $customers = array();
- $sql = "SELECT * FROM `customer`";
- if($genderId != 0){
- $sql .= " WHERE genderId=" . $genderId;
- }
- $sql .= " ORDER BY company, lastname ";
- if($records > 0){
- $sql .= " LIMIT $from, $records";
- }
- $res = $this->connection->query($sql);
- while($row = mysqli_fetch_assoc($res)){
- array_push($customers, new Customer($row, true));
- }
- return $customers;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement