last day (14 days later) » 

7:18 AM
0
A: Can we pass where condition in insert into statement if not what is the solution in Codeigniter?

PavelIn your example the script execution is stopped using: echo $this->db->last_query(); die(); after first insert the second query won't execute. Also you can debug what return the "$request" variable - var_dump($request); After that you will know how many loops are

 
that i have stoppped just for debugging purpose. I just wanted to know what actual query is genrated
Also if i remove that i wont make a difference as the script only inserts users it does not know to insert user for which reseller :(
 
Can you add a structure of users db table?
 
Yes Updated the question please check
 
Please add also Indexes of this tables, It is important to know if there are some unique keys
 
Again updated Please check. the id is primary key and auto incremented. and the field called key in both users and reseller in genrated through code i mean i generate a unique string and store it in key field
As mentioned in question each users is mapped to it reseller by that unique field called key which is generated through a code
debugging i have already removed from code thanks for that :) but m concerned about how to insert users for that reseller whose button is clicked to yes and not only the first reseller
 
7:18 AM
just add echo $this->db->last_query(); in loop and add die() after loop - then you will see all queries and will execute inside phpMyadmin - then will know what is the problem
 
Hi
See
My Query looks like this :INSERT INTO users (key) VALUES ('Rajan-92-1-100-1')
Now the admin can have requests from more than one reseller so when he clicks on button of 1st reseller users should be genrated for that similarly when he clicks yes for 2nd reseller
it should generate users for 2nd reseller
but my code only genrates users for 1st reseller
and by generating users i mean that a black row would be created in users table with only one field filled that would be the key and the reseller key will be inserted there
This is very confusing of-course
but i hope u understood what i want
 

last day (14 days later) »