Jump to content


GC newb-need some help

set_relation_n_n

  • Please log in to reply
3 replies to this topic

#1 mabbitt

mabbitt

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 25 May 2013 - 03:34 AM

hello folks,

newb here..

 

i'm currently learning GC

and want to try something like this..

 

 

the tables

   

 2z9mq6e.png

 

 

 

wanted output..

 

Destination : [a dropdown of city list]

Shipping Line : [a dropdown of line list]

Price : [normal input text]

 

 

i'll appreciate if there someone willing to help this newb.. :D

thanks in advance

 

 



#2 davidoster

davidoster

    Grocery CRUD Ninja

  • Advanced Member
  • PipPipPip
  • 1,068 posts
  • LocationAthens, Greece

Posted 25 May 2013 - 05:24 AM

Hello and welcome to the forums.

Try this and let us know if it is what you need.

$crud = new grocery_CRUD();
$crud->set_table('tariff');
$crud->set_relation('city_code', 'city', 'city_name');
$crud->set_relation('line_id', 'line', 'line_type');

____________________________________________________________

 

rtfm_small.jpg---!!!Please read these guidelines before asking to the forums!!!---

____________________________________________________________

 

David Oster aka George Pasparakis,
http://odphotography.com
http://eletter.gr


#3 mabbitt

mabbitt

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 25 May 2013 - 05:34 AM

wow, it works.

thanks a lot...



#4 mabbitt

mabbitt

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 26 May 2013 - 02:12 AM

hello again, peeps.

still learning about set_relation,

and feel a bit confused

 

here's the schema

 

 

 

2wpp6cj.jpg

 

 

 

 

 

 

wanted output:

 

trans code:

Destination : [a dropdown of city list]

Shipping Line : [a dropdown of line list]

 

weight:normal text input 

total: generated from multiplying price in tariff by weight in trans

status:a dropdown of status list

trans_date

 

thanks again







0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users