⚠ 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

[Solved] why set_relation store the wrong store value?



ceroberoz
  • profile picture
  • Member

Posted 12 February 2014 - 17:49 PM

I have 2 tables, the structure is like this

 

USERS

---------

uid

username

city

 

DEFAULT_CITIES

---------

cid

name

 

as the documented, I've use this

->set_relation('city','default_cities','name')

the dropdown shows fine, but the store value in the USERS table store the cid from the DEFAULT_CITIES table.

 

any solution how to store the DEFAULT_CITIES name into the USERS city from the set_relation function?

I need the city as name, not cid for my non-GC other function.

 

thanks before.

 

*ps: I am working on the USERS table.

---

I see GC works with ids rather than collumn name, looks like I will rewrite the correspondent non-GC function into GC-friendly.

sorry for this silly question