Insert after condition - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Insert after condition (/showthread.php?tid=60119) |
Insert after condition - El Forum - 01-19-2014 [eluser]maru[/eluser] Hello! I need to compare two values in a table: cliente and nro_cuota, if both exist I don't want to insert it. Here is my code Code: $crud = new grocery_CRUD(); and I wrote a model, I`m not sure if this is the right way, but I don't know how I must call it Code: class Compare_values_model extends CI_Model In pseudo code should be something like this" if (cliente and nrocuota exists) dont insert else insert But I don't know how to do this in my code, so hope can help me I couldn't find some examples on internet to learn more, thanks in advance. |