Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

space #62

Open
makhondi opened this issue Aug 8, 2019 · 4 comments
Open

space #62

makhondi opened this issue Aug 8, 2019 · 4 comments

Comments

@makhondi
Copy link

makhondi commented Aug 8, 2019

hi,
Please check the following code:
`
$values = array();

$values['string_text'] = " Hi"; // 4 Space

$string_id = 1;

$PDOx->table( 'strings' )->where( 'string_id', $string_id )->update( $values );

`

After implementation
Field value [string_text] = " Hi" // 1 Space
How to solve this problem?

@izniburak
Copy link
Owner

Hi @makhondi ,
Do you want to using 4 spaces for your data? Actually, all data are filtered by espace() method in PDOx. This method provide to remove space chars on the left and right of the value, and also apply quote() method in PDO for sql escaping and XSS blocking.

@makhondi
Copy link
Author

Yes
In fact, spaces and all the characters are of great value to us.

@izniburak
Copy link
Owner

Hi @makhondi ,
Maybe we can add a configuration to manage whether to trim data in PDOx. I'm not sure is this would be useful but we can still think.

Thanks.

@shaobingme
Copy link

i have same problem. the 4 spaces was replaced into 1 space.

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

No branches or pull requests

3 participants