Welcome Guest, Not a member yet? Register   Sign In
Using $this->input->post in a SQL Query Update
#6

[eluser]Derek Jones[/eluser]
I think update() is clearer and more concise, but when I write manual queries, I break out of the string to use escape_str() so no matter what changes might be made down the road to the code surrounding the query, you can know by looking at it whether or not the PHP variable being used has been properly escaped.

Complete aside, but wouldn't that schema be simpler if instead of multiple rows with different 'name' values you had a single row with columns for admin_name, admin_email, etc.?


Messages In This Thread
Using $this->input->post in a SQL Query Update - by El Forum - 07-18-2008, 12:07 PM
Using $this->input->post in a SQL Query Update - by El Forum - 07-18-2008, 12:12 PM
Using $this->input->post in a SQL Query Update - by El Forum - 07-18-2008, 12:20 PM
Using $this->input->post in a SQL Query Update - by El Forum - 07-18-2008, 12:41 PM
Using $this->input->post in a SQL Query Update - by El Forum - 07-18-2008, 12:46 PM
Using $this->input->post in a SQL Query Update - by El Forum - 07-18-2008, 01:02 PM
Using $this->input->post in a SQL Query Update - by El Forum - 07-18-2008, 01:25 PM



Theme © iAndrew 2016 - Forum software by © MyBB