Welcome Guest, Not a member yet? Register   Sign In
Escaping the trademark symbol with MySQL
#12

[eluser]TWP Marketing[/eluser]
FuzzyOne,
I pass arrays (and single vars) by reference in almost all cases, to reduce the memory space needed and reduce the execution time. For example, the text in question here is stored as a 'text' data type in MySQL, which can be up to 64KB, I'd rather not have that memory space duplicated from one function call to another. I declare most arrays in the controller and that one memory allocation is used by one or more other functions in the model. While it is rare to use more than a fraction of the 64KB, it is a possibility, so pass-by-reference makes sense. I've not found any part of CI's code that fails due to pass-by-reference (yet...).

As far as your second question, without encoding to the db, it works. But I didn't want to risk allowing unprotected HTML being stored in the db. I'll be adding some XSS_cleaning in the future too.
Thanks


Messages In This Thread
Escaping the trademark symbol with MySQL - by El Forum - 03-04-2009, 03:39 PM
Escaping the trademark symbol with MySQL - by El Forum - 03-04-2009, 04:03 PM
Escaping the trademark symbol with MySQL - by El Forum - 03-04-2009, 04:17 PM
Escaping the trademark symbol with MySQL - by El Forum - 03-04-2009, 04:47 PM
Escaping the trademark symbol with MySQL - by El Forum - 03-04-2009, 04:53 PM
Escaping the trademark symbol with MySQL - by El Forum - 03-04-2009, 04:58 PM
Escaping the trademark symbol with MySQL - by El Forum - 03-04-2009, 05:07 PM
Escaping the trademark symbol with MySQL - by El Forum - 03-04-2009, 05:11 PM
Escaping the trademark symbol with MySQL - by El Forum - 03-04-2009, 05:12 PM
Escaping the trademark symbol with MySQL - by El Forum - 03-04-2009, 05:17 PM
Escaping the trademark symbol with MySQL - by El Forum - 03-04-2009, 05:39 PM
Escaping the trademark symbol with MySQL - by El Forum - 03-04-2009, 06:00 PM
Escaping the trademark symbol with MySQL - by El Forum - 03-05-2009, 03:37 AM
Escaping the trademark symbol with MySQL - by El Forum - 03-05-2009, 12:12 PM



Theme © iAndrew 2016 - Forum software by © MyBB