<commit_before><?php

class Booking_m extends CI_Model
{
    function get_bookings()
    {
        $query = $this->db->query("call get_bookings()");
        $data = array();

        $result = $query->result();
        $query->free_result();

        $query->next_result(); // Dump the extra resultset.
        // Does what it says.

        foreach (@$result as $row)
        {
            $data[] = $row;
        }
        if(count($data))
            return $data;
        return false;
    }

    function get_booking($booking_id)
    {
        $query = $this->db->query("call get_booking({$booking_id})");
        $data = array();

        $result = $query->result();

        $query->next_result(); // Dump the extra resultset.
        $query->free_result(); // Does what it says.

        foreach (@$result as $row)
        {
            $data[] = $row;
        }
        if(count($data))
            return $data;
        return false;
    }

    function save($booking)
    {
        //todo move this to a stored procedure
        if($booking["booking_id"] == null)
        {
            // we don't have a booking id, we're adding
            $this->db->insert('booking', $booking);
            return $this->db->affected_rows();
        }

        $this->db->query("call update_booking({$booking['booking_id']},\"{$booking['pod_id']}\",{$booking['checkout_date']})");
    }
}<commit_msg>get rid of extra slashes and quotes<commit_after><?php

class Booking_m extends CI_Model
{
    function get_bookings()
    {
        $query = $this->db->query("call get_bookings()");
        $data = array();

        $result = $query->result();
        $query->free_result();

        $query->next_result(); // Dump the extra resultset.
        // Does what it says.

        foreach (@$result as $row)
        {
            $data[] = $row;
        }
        if(count($data))
            return $data;
        return false;
    }

    function get_booking($booking_id)
    {
        $query = $this->db->query("call get_booking({$booking_id})");
        $data = array();

        $result = $query->result();

        $query->next_result(); // Dump the extra resultset.
        $query->free_result(); // Does what it says.

        foreach (@$result as $row)
        {
            $data[] = $row;
        }
        if(count($data))
            return $data;
        return false;
    }

    function save($booking)
    {
        //todo move this to a stored procedure
        if($booking["booking_id"] == null)
        {
            // we don't have a booking id, we're adding
            $this->db->insert('booking', $booking);
            return $this->db->affected_rows();
        }

        $this->db->query("call update_booking({$booking['booking_id']},{$booking['pod_id']},{$booking['checkout_date']})");
    }
}
{'fraction_non_alphanumeric': 0.16417910447761194, 'fraction_numerical': 0.0, 'mean_word_length': 1.8636826042726349, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 35, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6792814', 'n_tokens_mistral': 882, 'n_tokens_neox': 854, 'n_words': 186}