thank very much Syam

i'm searchin haw to build a list of choice il my action to be
displayed in the template

may be i must use a doctrine query , have u an idea how i can buil the
DQL of this request

thanks

On Mar 13, 2:01 pm, Syam <[email protected]> wrote:
> I am not sure to understand,
>
> You want to retreive category from the existing job ? right ?
>
> But if this is the case, what about the first record ? You won't have
> any existing category, does not make sense ... (or you have to display a
> select input and a free text input, then get the value from one of the
> two fields ...)
>
> I think you should create a jobCategory model whith one-to-many relation
> to your job model, this is a simplier way and faster to execute :
>
> job:
>   connection: doctrine
>   tableName: job
>   columns:
>     id_marchandise:
>       type: integer(4)
>       primary: true
>       autoincrement: true
>    job_category_id: integer
>    sub_category:
>       type: string(50)
>   relations:
>     jobCategory:
>       type: one
>       foreignType: many
>       onDelete: SET NULL
>
> jobCategory:
>   columns:
>     name: string(128)
>
> Belgacem TLILI wrote:
> > i have this class
> > job:
> >   connection: doctrine
> >   tableName: job
> >   columns:
> >     id_marchandise:
> >       type: integer(4)
> >       primary: true
> >       autoincrement: true
> >    category:
> >       type: string(50)
> >    sub_category:
> >       type: string(50)
>
> > i would like have the data  of this table in (of my database) like a
> > list of option in indexSuccess.php
>
> > like this in html
>
> > <select name="job[category]" id="job_category">
> > <option value="1">Petit Colis</option>
> > <option value="2">Moyen Colis</option>
> > <option value="3">Grand Colis</option>
>
> > //........the data from database
>
> > <option value="7">Petite Palette</option>
> > <option value="8">Moyenne Palette</option>
> > <option value="9">Grande Palette</option>
> > </select>
>
> > how can i do this
>
> > how can i build a doctrine request (DQL)

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to