Insert and Update database checking |
CodeIgniter makes it easy to use DB transactions to make sure your inserts and updates all went well.
http://www.codeigniter.com/user_guide/da...tions.html (12-26-2015, 04:07 PM)RobertSF Wrote: If you're going to use queries like this, you need to understand that you will no longer benefit from the escaping (sanitizing) that CodeIgniter provides, in this case for the variable $user_id. I also think it's important to know how to use plain MySQL, but CodeIgniter does a lot for you, and you can get into trouble if you don't know what you're doing with plain MySQL. In the case of this example query, I would have type casted $user_id as an integer. |
Messages In This Thread |
Insert and Update database checking - by pb.sajjad - 12-26-2015, 12:14 PM
RE: Insert and Update database checking - by RobertSF - 12-26-2015, 04:07 PM
RE: Insert and Update database checking - by skunkbad - 12-26-2015, 04:28 PM
RE: Insert and Update database checking - by pmbaldha - 12-27-2015, 01:27 AM
RE: Insert and Update database checking - by pb.sajjad - 12-27-2015, 04:37 AM
RE: Insert and Update database checking - by pmbaldha - 12-27-2015, 05:20 AM
RE: Insert and Update database checking - by pb.sajjad - 12-27-2015, 10:09 AM
RE: Insert and Update database checking - by pmbaldha - 12-27-2015, 08:58 PM
RE: Insert and Update database checking - by pb.sajjad - 12-28-2015, 03:33 AM
RE: Insert and Update database checking - by Diederik - 12-28-2015, 01:13 AM
|