Skip to content
This repository has been archived by the owner on May 4, 2018. It is now read-only.

Arrest-MySQL does not escape requests #16

Open
joeinnes opened this issue Oct 17, 2014 · 1 comment
Open

Arrest-MySQL does not escape requests #16

joeinnes opened this issue Oct 17, 2014 · 1 comment

Comments

@joeinnes
Copy link

I'm looking at using Arrest-MySQL in a project, but it fails when I try and post data into a column with a hyphen in the name. The data passed to it contains a hyphen too. I have done quite a bit of testing, and it looks like the issue is that Arrest doesn't escape the input at all, and this breaks it. I have no idea how to PHP, but would love to use Arrest. Does anyone have any suggestions?

@joeinnes
Copy link
Author

OK, fixed that issue, now I have a new one:

$this->db->select('*')
->from($table)
->where($col, $search)
->order_by($this->_get('order_by'), $this->_get('order'))
->limit(intval($this->_get('limit')), intval($this->_get('offset')))
->query();

only returns one row. I've broken it down to

$this->db->select('*')
->from('table')
->where('column', 'search')
->query();

(with hardcoded values for testing), and it still only returns one row, even though the corresponding SQL query returns 4. Any ideas?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant