pdox
pdox copied to clipboard
space
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?
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.
Yes In fact, spaces and all the characters are of great value to us.
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.
i have same problem. the 4 spaces was replaced into 1 space.