⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

how to input 1 data in 2 table



Harasya
  • profile picture
  • Member

Posted 13 March 2013 - 09:32 AM

I have a question

 

how to write the order for 1 data into the second table
example
 
table A
---------------
id
username
password
level
 
 
tabel B
---------------
nik
name
address
level 
 
for nik = usernames and password
for level in table A = level in table B
 
 
thanks for the help.................. :)

sachin vairagi
  • profile picture
  • Member

Posted 13 March 2013 - 12:14 PM

you can use callback_before_insert() function

check this http://www.grocerycrud.com/examples/callback_before_insert_example


Harasya
  • profile picture
  • Member

Posted 13 March 2013 - 14:09 PM

you can use callback_before_insert() function

check this http://www.grocerycrud.com/examples/callback_before_insert_example

 

oooohhhhhh  my god

it work in my
thanks for  solution 

rebornishard
  • profile picture
  • Member

Posted 14 March 2013 - 01:26 AM

oooohhhhhh  my god

it work in my
thanks for  solution 

hello Indonesia  :wub: 
there is many example in grocery crud site, and u can also find it on api list

use search in grocery crud site, it gives very good result ;)