Query bindings keep unwanted quotes around IS NULL |
07-22-2016, 07:53 AM
(This post was last modified: 07-22-2016, 07:57 AM by meow. Edit Reason: clarity ) (07-21-2016, 03:22 PM)InsiteFX Wrote: Did you try using double quotes for the query body? Man, I tried everything lol. Tried concatenating and changing up the quote types all around. You think its worth looking into? I know ci is doing it to produce safer queries. (07-22-2016, 06:33 AM)Avenirer Wrote: A stupid question: If it's you who defines the value of $archived (in the code...), why put it as parameter and not simply concatenate it inside the string of the query? That's a good question and its fair to ask a stupid question if you are wanting to learn something (or you asking in order to hack my website? kidding..) That parameter is handy when using it from the controller: Setting it to TRUE in the controller calls the model method and setting it to FALSE can change things up in a quickie (not a seasoned php writer/veteran here). It should probably help you to see the SQL design to understand this further, let me know. Controller preview Code: $data['my_active_logbooks'] = $this->logbook_model->get_my_logs($this->session->userdata('person_id'),FALSE,$this->session->userdata('sorting')); I probably misunderstood your question though. |
Messages In This Thread |
Query bindings keep unwanted quotes around IS NULL - by meow - 07-21-2016, 10:36 AM
RE: Query bindings keep unwanted quotes around IS NULL - by meow - 07-21-2016, 12:12 PM
RE: Query bindings keep unwanted quotes around IS NULL - by InsiteFX - 07-21-2016, 03:22 PM
RE: Query bindings keep unwanted quotes around IS NULL - by Avenirer - 07-22-2016, 06:33 AM
RE: Query bindings keep unwanted quotes around IS NULL - by Narf - 07-22-2016, 07:43 AM
RE: Query bindings keep unwanted quotes around IS NULL - by meow - 07-22-2016, 07:53 AM
RE: Query bindings keep unwanted quotes around IS NULL - by InsiteFX - 07-22-2016, 11:52 AM
RE: Query bindings keep unwanted quotes around IS NULL - by mwhitney - 07-22-2016, 12:27 PM
|